swiper 点击跳转页面 老是自己回到第一页

发布于 7 年前作者 ayao16802 次浏览最后编辑 7 年前来自 ask

js 部分

tzyema: function (e) {

console.log(e);

var that = this;

that.data.yemian = e.target.id - 1;

this.data.yemian = e.detail.current;

this.setData({

  yemian: e.target.id - 1,

timuArr: that.data.timuArr,

})

},

2 回复
pingma
pingma1 楼6 年前

设置wx:key试一下

gaochao
gaochao2 楼6 年前

请提供完整的能复现问题的代码示例。