<view bindtap="getDataAttr" data-postId="{{postId}}" data->
</view>
getDataAttr:function(e){
console.log(e.currentTarget.dataset.id)
console.log(e.currentTarget.dataset.postId)
}
<view bindtap="getDataAttr" data-postId="{{postId}}" data->
</view>
getDataAttr:function(e){
console.log(e.currentTarget.dataset.id)
console.log(e.currentTarget.dataset.postId)
}
相关文章: