|
@@ -10,7 +10,7 @@ import { PropType, toRefs, shallowReactive, watch } from 'vue'
|
|
|
import { CreateComponentType } from '@/packages/index.d'
|
|
import { CreateComponentType } from '@/packages/index.d'
|
|
|
import { useChartDataFetch } from '@/hooks'
|
|
import { useChartDataFetch } from '@/hooks'
|
|
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
|
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
|
|
|
-import { option as configOption } from './config'
|
|
|
|
|
|
|
+import { option as configOption } from './config'
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
chartConfig: {
|
|
chartConfig: {
|
|
@@ -26,11 +26,13 @@ const option = shallowReactive({
|
|
|
const { w, h } = toRefs(props.chartConfig.attr)
|
|
const { w, h } = toRefs(props.chartConfig.attr)
|
|
|
const { size, gradient } = toRefs(props.chartConfig.option)
|
|
const { size, gradient } = toRefs(props.chartConfig.option)
|
|
|
|
|
|
|
|
-
|
|
|
|
|
watch(
|
|
watch(
|
|
|
() => props.chartConfig.option.dataset,
|
|
() => props.chartConfig.option.dataset,
|
|
|
(newData: any) => {
|
|
(newData: any) => {
|
|
|
option.dataset = newData
|
|
option.dataset = newData
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ immediate: true
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
|
|
|