小程序点击事件改变样式普通js鼠标点击事件-js触发小程序事件-小程序模拟点击
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})}声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

