猿问
下载APP

如何把普通tab切换改成vant滑动切换

<van-row style="text-align:center;height:0.88rem;line-height:0.88rem;margin-bottom:0.01rem;" >

<van-col style="background-color:#1b2229;width:20%;white-space:nowrap;"  v-for="(counter, index) in counters " @click.native="handleTabClick(index)"  :key="index " >

<span :class="currentIndex===index?'click_class':'common_class'">

<img :src="optionalClick" v-if="counter==='OPTIONAL' && currentIndex===index" class="option_class" />

<img :src="optionalNormal" v-if="counter==='OPTIONAL' && currentIndex!==index" class="option_class" />

{{getHead(counter)}}

</span>

</van-col>

</van-row>

tab部分的代码如上,van-row和van-col替换成van-tabs和van-tab?


qq_认清自己_0
浏览 1604回答 0
0回答
打开App,查看更多内容
随时随地看视频慕课网APP
我要回答