html中
// el-table 要加上 row-key;el-talble-column 要加上 :reserve-selection='true'
<el-table ref='pageTable' row-key='id' :data='dataList' border stripe @selection-change='handleSelection'>
<el-talble-column type='selection' :reserve-selection='true' align='center' width='39' >
</el-talble-column>
<el-talble-column align='center' width='60' label='姓名' prop='name'>
</el-talble-column>
</el-table>
js中
// 编辑
edit(obj){
obj.ids.map(id =>{
this.dataList.map(row=>{
if(row.id==id){
this.$refs.pageTable.toggleRowSelection(row,true) // 选中上次选中的数据
}
}
}
}