<el-table
@selection-change="handleSelectionChange"
:row-key="getRowKeys"
>
<el-table-column type="selection" width="55" :reserve-selection="true"/>
//:reserve-selection="true"这个是翻页还能回显的关键
getRowKeys(row) {
return row.no; //这里只要是唯一的id就行
},
// 这里的selection是你所有选择的项
handleSelectionChange(selection) {
this.selectedIds = selection.map((item) => item.no);
console.log(this.selectedIds);
},