fix(组件): 修复tab组件中子组件moduleIndex冲突问题

为tab组件中的子组件添加tabIndex前缀,避免不同tab页中子组件的moduleIndex冲突
This commit is contained in:
2026-02-07 15:57:49 +08:00
parent e9db54980e
commit e943b11c8f
2 changed files with 8 additions and 3 deletions

View File

@@ -33,7 +33,7 @@
:style="[panelStyle, activeTab === idx ? panelActiveStyle : {}]">
<view v-if="tab.components && tab.components.length > 0" class="tab-components">
<!-- 渲染每个标签下的组件 -->
<diy-group v-if="tab.components" :diyData="{ value: tab.components, global: diyGlobal }"
<diy-group v-if="tab.components" :diyData="{ value: tab.components, global: diyGlobal, tabIndex: idx }"
:scrollTop="tab.scrollTop || 0" />
</view>
</view>
@@ -49,7 +49,7 @@
:style="[panelStyle, activeTab === idx ? panelActiveStyle : {}]">
<view v-if="tab.components && tab.components.length > 0" class="tab-components">
<!-- 渲染每个标签下的组件 -->
<diy-group v-if="tab.components" :diyData="{ value: tab.components, global: diyGlobal }"
<diy-group v-if="tab.components" :diyData="{ value: tab.components, global: diyGlobal, tabIndex: idx }"
:scrollTop="tab.scrollTop || 0" />
</view>
</view>