uni-app中radio动态生成和数据绑定
- uni-app动态生成多个radio-group并进行数据绑定
<uni-tr v-for="(item, index) in dataList" :key="index">
<uni-td align="center">{{item.name}}</uni-td>
<uni-td align="center">
<templates slot-scope>
<radio-group @change="(value)=>{
item.selected = value.detail.value=='0'?false:true}">
<radio value="0" :checked="!item.selected">合格</radio>
<radio value="1" :checked="item.selected">不合格</radio>
</radio-group>
</templates>
</uni-td>
</uni-tr>