1.

1.wxml中

viewclass"column"viewclass"body-view{{num1?'active':''}}"bindtap"bindChoice"data-num'1'推荐/viewviewclass"body-view{{num2?'active':''}}"bindtap"bindChoice"data-num'2'热门/viewviewclass"body-view{{num3?'active':''}}"bindtap"bindChoice"data-num'3'分类/view/view2.js中data{num:1}bindChoice:function(e){console.log(e);this.setData({num:e.target.dataset.num})}

TAG标签: 小程序点击事件改变样式普通js鼠标点击事件js触发小程序事件小程序模拟点击

http://www.xiaochengxub.com/read-96029.html