效果(超过自己设定的个数后禁止勾选):
<el-table
:data="tableData"
:cell-style="tableCellStyle"
height="350px"
highlight-current-row
border
v-loading="loading"
@select="tableSelectChangeLeft"
:row-key="row => { return row.id }"
>
<el-table-column :reserve-selection="true" type="selection" :selectable="checkStatus" width="55" align="center" />
methods: {
checkStatus(){
return this.selectedRowData.num>this.tableDataAdd.length
},
如果想隐藏el-table表头的多选框:
//去掉表头多选框
::v-deep .el-table__header-wrapper .el-checkbox {
display: none;
}