小程序点击事件传参数【适用于循环出来的数据】
<view bindtap="getQuery" data-index="1">点击事件传参</view>
getQuery: function(e){
// 传递的参数
let query = e.currentTarget.dataset['index'];
}
小程序点击事件传参数【适用于循环出来的数据】
<view bindtap="getQuery" data-index="1">点击事件传参</view>
getQuery: function(e){
// 传递的参数
let query = e.currentTarget.dataset['index'];
}