From b512328a70bed21211d64133f63eaae87d3c3a64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?= <1262327911@qq.com> Date: Tue, 30 Aug 2022 12:18:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E6=B8=90=E5=8F=98?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E9=A2=84=E8=A7=88=E6=97=A0=E6=B3=95=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Informations/Texts/TextGradient/index.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/packages/components/Informations/Texts/TextGradient/index.vue b/src/packages/components/Informations/Texts/TextGradient/index.vue index d16d1c19..09daa783 100644 --- a/src/packages/components/Informations/Texts/TextGradient/index.vue +++ b/src/packages/components/Informations/Texts/TextGradient/index.vue @@ -10,7 +10,7 @@ import { PropType, toRefs, shallowReactive, watch } from 'vue' import { CreateComponentType } from '@/packages/index.d' import { useChartDataFetch } from '@/hooks' import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore' -import { option as configOption } from './config' +import { option as configOption } from './config' const props = defineProps({ chartConfig: { @@ -26,11 +26,13 @@ const option = shallowReactive({ const { w, h } = toRefs(props.chartConfig.attr) const { size, gradient } = toRefs(props.chartConfig.option) - watch( () => props.chartConfig.option.dataset, (newData: any) => { option.dataset = newData + }, + { + immediate: true } )