uniapp u_tabs 切换

<u-tabs style="padding-bottom: 20rpx;" bg-color="#f8f8f8" :list="tab_list" :is-scroll="false" :current="tab_index" @change="tabs_change" active-color="#fb2e09"
:barStyle="barStyle"></u-tabs>

第一步  @change="tabs_change"  :current="tab_index" 

data里面定义  

tab_index: 0,
// 0 => '续期处理',
// 1 => '提前归还',
//2 => '报停申请'
tab_list: [{
name: '续期处理',
status: 0
},
{
name: '提前归还',
status: 1
},
{
name: '报停申请',
status: 2
}
],

最后 methods 事件  

tabs_change(e) {
console.log(e)
this.tab_index = e;
this.mescroll.resetUpScroll();
},

最后使用v-if完成 

<view class="processing_title" v-if="tab_index == 1">

</view>

原文地址:https://www.cnblogs.com/lilamisu/p/13723461.html