微信小程序 单选框实现
wxml:
<radio-group class="radio-group" bindchange="radioChang" data-id="{{item.id}}">
<view class='ra' bindtap='next'>
<radio value="1"><text>失物招领</text></radio>
</view>
<view class='ra' bindtap='next'>
<radio value="2"><text>寻物启事</text></radio>
</view>
</radio-group>
js:
radioChang: function (e) {
console.log('radio发生change事件,携带value值为', e.detail.value)
},