<script lang="ts" setup>
|
import type { EchartsUIType } from '@vben/plugins/echarts';
|
|
import { onMounted, ref } from 'vue';
|
|
import { EchartsUI } from '@vben/plugins/echarts';
|
|
import { useEChart } from '../../Design/hooks/useEChart';
|
|
const props = defineProps(['activeData']);
|
const chartRef = ref<EchartsUIType>();
|
const { CardHeader, init } = useEChart(props.activeData, chartRef);
|
|
onMounted(() => init());
|
</script>
|
<template>
|
<a-card class="portal-card-box">
|
<template #title v-if="activeData.title">
|
<CardHeader :title="activeData.title" :card="activeData.card" />
|
</template>
|
<div class="portal-card-body h-full">
|
<EchartsUI ref="chartRef" class="box-inherit !h-full w-full p-[10px]" />
|
</div>
|
</a-card>
|
</template>
|