小说明
- 根据change事件修改model绑定的值
- label绑定唯一值
- 用来覆盖label的值,无需覆盖则不需要书写
template
<el-table-column label="选择">
<template slot-scope="scope">
<el-radio
v-model="colonyId"
:label="scope.row.serverId"
@change="getSelectedId(scope.row.serverId)"
> </el-radio>
</template>
</el-table-column>
script
data(){
return(){
colonyId:''
}
},
methods:{
getSelectedId(id){
this.colonyId = id;
}
}