From 991d0d3d0c6780dfcaec382c086644e390b2e01b Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 27 Aug 2024 13:15:51 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8F):?= =?UTF-8?q?=20=E4=BC=98=E5=8C=96=E6=95=B0=E6=8D=AE=E5=A4=A7=E5=B1=8FTab?= =?UTF-8?q?=E5=86=85=E7=BB=84=E4=BB=B6=E7=9A=84=E5=9B=BE=E5=B1=82=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/store/modules/data-visualization/common.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/core-frontend/src/store/modules/data-visualization/common.ts b/core/core-frontend/src/store/modules/data-visualization/common.ts index ff51a9b921..2b7af19d3c 100644 --- a/core/core-frontend/src/store/modules/data-visualization/common.ts +++ b/core/core-frontend/src/store/modules/data-visualization/common.ts @@ -7,6 +7,7 @@ export const getCurInfo = () => { if (curComponent.value) { const curComponentId = curComponent.value.id let curIndex = 0 + let curTabIndex = 0 let curComponentData = componentData.value componentData.value.forEach((component, index) => { if (curComponentId === component.id) { @@ -20,9 +21,21 @@ export const getCurInfo = () => { } }) } + if (component.component === 'DeTabs') { + component.propValue.forEach((tabItem, tabIndex) => { + curTabIndex = tabIndex + tabItem.componentData.forEach((tabComponent, subIndex) => { + if (curComponentId === tabComponent.id) { + curIndex = subIndex + curComponentData = tabItem.componentData + } + }) + }) + } }) return { index: curIndex, + tabIndex: curTabIndex, componentData: curComponentData } }