hover-class='tabItem_hover'>
内容1
hover-class='tabItem_hover'>
已结清账单
内容1
内容2
//swiper切换时会调用
pagechange: function (e) {
let that = this;
that.setData({ currentIndex: e.detail.current });
},
//用户点击tab时调用
titleClick: function (e) {
let that = this;
if( that.data.currentIndex === e.currentTarget.dataset.idx ) {
return false;
} else {
that.setData({
currentIndex: e.currentTarget.dataset.idx
})
}
},
此处可能会出现Tab显示空白问题,经验证,swiper-item不可直接写样式或者class类名,需要在swiper内部写样式