|
|
@ -116,18 +116,17 @@ export default { |
|
|
|
this.$refs.table.toggleRowSelection(row) |
|
|
|
}, |
|
|
|
selectionChangeHandler(val) { |
|
|
|
let finalVal |
|
|
|
if (val.length > 1) { |
|
|
|
// 取出最后val的最后一个返回出来 |
|
|
|
finalVal = val.pop() |
|
|
|
const finalVal = val.pop() |
|
|
|
// 清除所有选中 |
|
|
|
this.$refs.table.clearSelection() |
|
|
|
// 给最后一个加上选中 |
|
|
|
this.$refs.table.toggleRowSelection(finalVal) |
|
|
|
this.crud.selectionChangeHandler([finalVal]) |
|
|
|
} else { |
|
|
|
finalVal = val |
|
|
|
this.crud.selectionChangeHandler(val) |
|
|
|
} |
|
|
|
this.crud.selectionChangeHandler(finalVal) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|