From 6e6e0ddcd3a4227450f5de74b496f156261687bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=98=89=E8=B1=AA?= <42510293+ziyujiahao@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:57:27 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF=E3=80=81?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E5=87=BA=E7=8E=B0=E9=87=8D=E5=A4=8Did?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=97=A0=E6=B3=95=E5=88=A0=E9=99=A4=E6=83=85?= =?UTF-8?q?=E5=86=B5=20(#16545)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/store/modules/data-visualization/dvMain.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts index eab5853116..044bfed52a 100644 --- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts +++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts @@ -555,10 +555,10 @@ export const dvMainStore = defineStore('dataVisualization', { deleteComponentById(componentId, componentData = this.componentData, deep = false) { if (componentId) { - let indexResult + const indexResult = [] componentData.forEach((component, index) => { if (componentId === component.id) { - indexResult = index + indexResult.push(index) } else if (deep && component.component === 'Group') { this.deleteComponentById(componentId, component.propValue || []) } else if (deep && component.innerType === 'DeTabs') { @@ -567,7 +567,9 @@ export const dvMainStore = defineStore('dataVisualization', { }) } }) - this.deleteComponent(indexResult, componentData) + indexResult.forEach(indexItem => { + this.deleteComponent(indexItem, componentData) + }) } },