滑动效果和点击效果
/**
* 滑动切换tab
*/
bindChange: function(e) {
var that = this;
that.setData({
currentTab: e.detail.current
});
},
/**
* 点击tab切换
*/
swichNav: function(e) {
var that = this;
if (this.data.currentTab === e.target.dataset.current) {
return false;
} else {
that.setData({
currentTab: e.target.dataset.current
})
}
},
handleChangePanle(e) {
let cahnge = e.currentTarget.dataset.change
if (cahnge == 0) {
this.setData({
current: 0
})
} else {
this.setData({
current: 1
})
}
},