如何把普通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?


六月柒
浏览 4776回答 2
2回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Vue.js
Node.js