<radio-group bindchange="radioChange" class="form-radio_wrap">
<block wx:for="{{wifiList}}" wx:key="{{item.id}}">
<view class="items flex-row-between">
<view class="flex-row-start">
<radio wx:if="{{flag}}" value="{{item.id}}"></radio>
<view>{{item.wifiName}}</view>
</view>
<image bindtap="updateWIFI" data-item="{{item}}" class="icon_right" src="/img/wifiManage/icon_right.png"></image>
</view>
</block>
</radio-group>
.form-radio_wrap .wx-radio-input{
width: 40rpx;
height: 40rpx;
border-radius: 10%;
}
.form-radio_wrap .wx-radio-input.wx-radio-input-checked{
border: none;
background: #FC2530;
}
.form-radio_wrap radio .wx-radio-input.wx-radio-input-checked::before {
border-radius: 10%;
text-align: center;
font-size: 30rpx;
color: #fff;
transform: translate(-50%, -50%) scale(1);
-webkit-transform: translate(-50%, -50%) scale(1);
}
radioChange(e) {
const wifiList = this.data.wifiList
let selectedId = ""
wifiList.forEach(v => {
v.checked = false
if (v.id == e.detail.value) {
v.checked = true
selectedId = v.id
}
})
this.setData({
wifiList,
selectedId
})
}