From 8ceb1560140274d150ddbc5882724a3ac1dbbce3 Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Wed, 9 Oct 2024 13:01:02 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=9B=BE=E8=A1=A8=E6=95=B0=E6=8D=AE=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=89=80=E6=9C=89=E5=9B=BE=E8=A1=A8=E9=83=BD=E6=98=BE?= =?UTF-8?q?=E7=A4=BAsvg=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/components/editor/index.vue | 2 +- .../src/views/chart/components/views/index.vue | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/core-frontend/src/views/chart/components/editor/index.vue b/core/core-frontend/src/views/chart/components/editor/index.vue index b4a6cd0a84..21380ad271 100644 --- a/core/core-frontend/src/views/chart/components/editor/index.vue +++ b/core/core-frontend/src/views/chart/components/editor/index.vue @@ -836,7 +836,7 @@ const calcData = (view, resetDrill = false, updateQuery = '') => { const updateChartData = view => { curComponent.value['state'] = 'ready' - useEmitt().emitter.emit('checkFieldIsAllowEmpty', allFields.value) + useEmitt().emitter.emit('checkShowEmpty', { allFields: allFields.value, view: view }) calcData(view, true, 'updateQuery') } diff --git a/core/core-frontend/src/views/chart/components/views/index.vue b/core/core-frontend/src/views/chart/components/views/index.vue index a43c0f547f..bd4eaa7404 100644 --- a/core/core-frontend/src/views/chart/components/views/index.vue +++ b/core/core-frontend/src/views/chart/components/views/index.vue @@ -641,8 +641,12 @@ onMounted(() => { return } useEmitt({ - name: 'checkFieldIsAllowEmpty', - callback: allField => checkFieldIsAllowEmpty(allField) + name: 'checkShowEmpty', + callback: param => { + if (param.view?.id === view.value.id) { + checkFieldIsAllowEmpty(param.allFields) + } + } }) useEmitt({ name: 'chart-type-change', callback: changeChartType }) useEmitt({ name: 'dataset-change', callback: changeDataset })