优化tab组件使用

This commit is contained in:
aihe 2023-12-08 23:53:11 +08:00
parent ce5387fef1
commit 23ff2eb144
3 changed files with 9 additions and 4 deletions

View File

@ -5,6 +5,7 @@
:class="`sta-item ${value == item.val?'active':''} stai-${mode}`">
<view class="stai-text">
{{item.title}}
<slot :item="item"></slot>
<view class="stai-chk-line"></view>
</view>
</view>

View File

@ -14,9 +14,11 @@
<u-row justify="between" align="top">
<u-col span="12">
<tpx-tabs :list="tabList" v-model:value="searchParam.tabType"
@tabchange="(val)=> { handleSearchParamChange() }"
@tabchange="(val)=> { handleSearchParamChange() }" v-slot="curTab"
>
(<text>0</text>)
<text slot>
(<text>{{curTab.item.val}}</text>)
</text>
</tpx-tabs>
</u-col>

View File

@ -12,9 +12,11 @@
<u-col span="9">
<!-- 订单状态 -->
<tpx-tabs :list="ordStatusList" v-model:value="searchParam.ordStatus"
@tabchange="(val)=> { handleSearchParamChange() }" mode="info"
@tabchange="(val)=> { handleSearchParamChange() }" mode="info" v-slot="curOrdTab"
>
(<text>0</text>)
<text slot>
(<text>{{curOrdTab.item.val}}</text>)
</text>
</tpx-tabs>
</u-col>
<u-col span="2">