因?yàn)轫?xiàng)目需要侨颈,要對element ui中table表格的多選按鈕進(jìn)行可勾選和不可勾選 的操作
簡單脆丁,易上手
一秃诵、在復(fù)選框 加一個事件 :selectable='selectInit'
<el-table-column align="center" type="selection" :selectable='selectInit' width="55"/>
二肥矢、在事件中判斷
selectInit(row,index){
if(row.status==2){
return false //不可勾選
}else{
return true //可勾選
}
}
完事6饭 7!