直接上代码
选框列加一个函数 :selectable='selectDisableRoom'
<el-table
:data="tableData"
border
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="60" :selectable='selectDisableRoom'> </el-table-column>
methods: {
// 把为 0 的项启用
selectDisableRoom:function (row) {
//console.log(row)
if(row.status == 0){
return true
}
},
}