<el-table :data="depardata" :row-key="getRowKeys" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" :reserve-selection="true">
</el-table-column>
</el-table>
<script>
//方法
getRowKeys(row) {
return row.id;
}
</script>
两个需要注意的点 需要设置row-key 同时在在选择框需设置reserve-select 为true