elementui table 多选 获取id

//多选相关方法
toggleSelection(rows) {
if (rows) {
rows.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row);
});
} else {
this.$refs.multipleTable.clearSelection();
}
},
handleSelectionChange(val) {
this.multipleSelection = val;
let ids = []
this.multipleSelection.map((item)=> {
ids.push(item.key)
})
this.selectedIDs = ids
console.log('多选',this.selectedIDs)
},
原文地址:https://www.cnblogs.com/thinkingthigh/p/9043140.html