实现效果如图(虚拟机上开发,不能截图,不能联网.只能拍照了):
<el-table-column label="选择">
<template slot-scope="scope">
<el-radio v-model="radio" :label="scope.$index"
@change.native="radioChange(scope.row, scope.$index)"
>$nbsp;
</el-radio>
</template>
</el-table-column>
script中
data () {
return {
radio: '',
radioSelect: ''. //选中的数据赋值给它
}
},
methods: {
radioChange(row, index) {
this.radioSelect = row;
}
}
样式根据你们要求写吧, 这里就不贴(手)出(打)来了.