<el-table id="tables" ref="multipleTable" row-key="id"
:data="tableData"
max-height="450"
border
style="width: 100%"
@selection-change="handleSelectionChange"
:header-cell-style="{background:'#F8F8FA',color:'#606266',fontSize:'13px',fontWeight:'bold'}"
>
<el-table-column type="selection" width="60" align="center" :reserve-selection="true"></el-table-column>
<el-table-column prop="id" label="序号" width="120" align="center"> </el-table-column>
<el-table-column prop="name" label="话题名称" align="center" show-overflow-tooltip> </el-table-column>
</el-table>
handleSelectionChange(val) {
if(val.length >=2){
let arrays = val.splice(0,val.length-1)
arrays.forEach(row => {
this.$refs.multipleTable.toggleRowSelection(row);
})
}
}