mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-06 03:58:04 +08:00
23 lines
622 B
Vue
23 lines
622 B
Vue
<template>
|
|
<GoVChart ref="vChartRef" :option="chartConfig.option"> </GoVChart>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { PropType } from 'vue'
|
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
|
import { GoVChart } from '@/components/GoVChart'
|
|
import { useChartDataFetch } from '@/hooks'
|
|
import config from './config'
|
|
|
|
const props = defineProps({
|
|
chartConfig: {
|
|
type: Object as PropType<config>,
|
|
required: true
|
|
}
|
|
})
|
|
|
|
const { vChartRef } = useChartDataFetch(props.chartConfig, useChartEditStore, (newData: any) => {
|
|
props.chartConfig.option.dataset = newData
|
|
})
|
|
</script>
|