element el-radio单选切换
效果图如下单选切换,绑定数据
通过 slot-scope="scope" 绑定 传过来的bbbb实现数据绑定切换
可以打印scope.row会发现是
el-table 的 :data 绑定的数组
<el-table-column prop="bbbb" fixed="right" width="150" type="radio"> <template slot-scope="scope"> <el-radio v-model="scope.row.bbbb" label="1">是</el-radio> <el-radio v-model="scope.row.bbbb" label="2">否</el-radio> </template> </el-table-column>