<view bindtap="node" data-num="5">
点击传值:{{nums}}
</view>
data: {
nums:null,
},
node(e){
console.log(e.currentTarget.dataset.num);
var n = e.currentTarget.dataset.num;
this.setData({
nums:n
})
},
标签:nums,微信,绑定,dataset,num,currentTarget,传值 From: https://www.cnblogs.com/yeli-oneselfblogs/p/17084887.html