微信小程序-wxml标签绑定data值传参给js方法(事件传参)
时间:2020-05-19 14:14:48
收藏:0
阅读:275
俗称页面绑定的事件传参
wxml
<view class="btn two" bindtap="goFn" data-name="{{item.name}}">客户档案</view>
js
...
goFn(e){
wx.navigateTo({
url: "./details?name="+e.currentTarget.dataset.name
})
},
评论(0)