From aad72ec5b6996abff73506851e9ea57c952a08bd 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: Fri, 17 Jun 2022 11:42:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E6=8E=92=E5=90=8D=E5=88=97=E8=A1=A8=E9=A2=84=E8=A7=88=E4=B9=8B?= =?UTF-8?q?=E5=90=8E=E6=95=B0=E6=8D=AE=E6=97=A0=E6=B3=95=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=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/Tables/Tables/TableList/index.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/packages/components/Tables/Tables/TableList/index.vue b/src/packages/components/Tables/Tables/TableList/index.vue index f1b8d487..f8ff364a 100644 --- a/src/packages/components/Tables/Tables/TableList/index.vue +++ b/src/packages/components/Tables/Tables/TableList/index.vue @@ -164,17 +164,19 @@ watch( } ) -// 数据更新 +// 数据更新(配置时触发) watch( - () => props.chartConfig.option, + () => props.chartConfig.option.dataset, () => { - console.log('数据更新', props.chartConfig.option) onRestart() - }, - {deep:true} + } ) -useChartDataFetch(props.chartConfig, useChartEditStore) +// 数据callback处理(预览时触发) +useChartDataFetch(props.chartConfig, useChartEditStore, (resData: any[]) => { + props.chartConfig.option.dataset = resData + onRestart() +}) onUnmounted(() => { stopAnimation()