首先需要定义表格的ref,在其选择的长度大于1时便可使用 this.$refs.multipleTable.clearSelection()先将其选择置空, 再使用val.pop(),返回的是数组的最后一项,最后使用this.$refs.multipleTable.toggleRowSelection(val.pop())将其最后的选择项放置方法中 。而多选框则可以使用深度选择器进行隐藏:
::v-deep .el-table__header-wrapper .el-checkbox {
display: none
}