From e943b11c8fc94a9feedb31590ad62fd3d422f6a7 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Sat, 7 Feb 2026 15:57:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=BB=84=E4=BB=B6):=20=E4=BF=AE=E5=A4=8Dta?= =?UTF-8?q?b=E7=BB=84=E4=BB=B6=E4=B8=AD=E5=AD=90=E7=BB=84=E4=BB=B6moduleIn?= =?UTF-8?q?dex=E5=86=B2=E7=AA=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 为tab组件中的子组件添加tabIndex前缀,避免不同tab页中子组件的moduleIndex冲突 --- components-diy/diy-group.vue | 7 ++++++- components-diy/diy-tab.vue | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/components-diy/diy-group.vue b/components-diy/diy-group.vue index 8149d33..baaa1d8 100644 --- a/components-diy/diy-group.vue +++ b/components-diy/diy-group.vue @@ -317,7 +317,12 @@ export default { this.diyGlobalData.value.forEach((item, index) => { item.pageStyle = ''; // 给每个组件增加位置属性,用于定位,搜索、分类导航等定位 - item.moduleIndex = index + 1; + // 如果是Tab组件内部的子组件,添加tabIndex前缀避免moduleIndex冲突 + if (this.diyData.tabIndex !== undefined) { + item.moduleIndex = `${this.diyData.tabIndex}-${index + 1}`; + } else { + item.moduleIndex = index + 1; + } // 特殊处理搜索框 当显示位置为滚动至顶部固定时,只设置背景颜色 if (item.componentName == 'Search' && item.positionWay == 'fixed') { diff --git a/components-diy/diy-tab.vue b/components-diy/diy-tab.vue index f97588a..245c3dd 100644 --- a/components-diy/diy-tab.vue +++ b/components-diy/diy-tab.vue @@ -33,7 +33,7 @@ :style="[panelStyle, activeTab === idx ? panelActiveStyle : {}]"> - @@ -49,7 +49,7 @@ :style="[panelStyle, activeTab === idx ? panelActiveStyle : {}]"> -