1、在el-table中添加
ref="multipleTable"
:row-key="getRowKeys"
2、在el-table-column中添加
<el-table-column type="selection" :reserve-selection="true"></el-table-column>
3、methods中添加
getRowKeys(row) {
return row.id
}
4、取消多选
this.$refs.multipleTable.clearSelection()