将页面确定上的数值5传到js
微信官网
wtml:
<view class="distpicker-btn"> <view class="distpicker-cancel-btn" bindtap="pickerCancel">取消</view> <view class='type'>性别</view> <view class="distpicker-sure-btn base_textcolor" bindtap="pickerSure" data-num="5">确定</view> </view>
js
pickerSure:function(e){ console.log(e) console.log(this.data.selectValue); console.log(e.currentTarget.dataset.num) },