element-ui table中使用type='selection'实现多选禁用问题

问题:
在表格中使用type='selection'实现多选,需要禁用某一行。

解决办法:

HTML:

1 <el-table-column type="selection" :selectable='checkboxSelect' width="55"></el-table-column>

JS:

checkboxSelect (row, rowIndex) {
     if (row.status == 1) {
        return true // 不禁用
     }else{
        return false // 不禁用
     }
 }

 

posted @ 2020-10-13 13:37  最初的样子  阅读(6204)  评论(4编辑  收藏  举报