fix(组件): 修复tab组件中子组件moduleIndex冲突问题
为tab组件中的子组件添加tabIndex前缀,避免不同tab页中子组件的moduleIndex冲突
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user