ny
22 小时以前 282fbc6488f4e8ceb5fda759f963ee88fbf7b999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<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>