1、在type = selection 列加上selectable方法,利用函数返回值来控制勾选框的可选与禁用
<el-table border ref="table" :data="tableData" tooltip-effect="dark" style="width: 100%" height="40vh" :stripe="true" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" :selectable="selectable" fixed="left"></el-table-column>
</el-table>
2、
selectable(row, index) {
if (row.shelfFlag == 0 || row.sequestrationFlag == 1) {
return false //禁用
} else {
return true //可选
}
},