1 回答
TA贡献2003条经验 获得超2个赞
我用的Swiper是好的,这个是横滑
<div class="swiper-container-more">
<ul class="category_nav_tabs swiper-wrapper">
<li class="category_nav_tab swiper-slide" v-for="(li,index) in categoryNameList" :class="{active : select === index}" :key="index">
<a class="category_nav_type text-center" @click="tabsIndex(index)">{{li}}</a>
</li>
</ul>
</div>
methods: {
//滑动插件,延迟200ms执行该函数
initSwiper() {
var mySwiper = new Swiper('.swiper-container-more', {
slidesPerView: 'auto',
freeMode: true,
});
},
}
添加回答
举报