<view :class="[{'on':curTab==0},'swiper-tab-list']" data-current="0" @click="swichNav('swichNav',event)" >
<swiper-item id="noticeswiper">
</swiper-item>
</swiper>
bindChange(promp,e){
var that = this;
let oIndex = e.mp.detail.current;
this.curTab=oIndex
},
swichNav(propt,e){
var that = this;
let oIndex = e.mp.currentTarget.dataset.current;
this.currentTab = oIndex;
this.curTab=oIndex;
},
注:这是mpvue的写法
网友评论