@@ -1109,6 +1135,15 @@ You can also select multiple rows.
},
methods:{
toggleSelection(rows){
if(rows){
rows.forEach(row=>{
this.$refs.multipleTable.toggleRowSelection(row);
});
}else{
this.$refs.multipleTable.clearSelection();
}
},
handleSelectionChange(val){
this.multipleSelection=val;
}
...
...
@@ -1479,8 +1514,9 @@ When the row content is too long and you do not want to display the horizontal s
### Table Methods
| Method | Description | Parameters |
|------|--------|-------|
| clearSelection | clear selection, might be useful when `reserve-selection` is on | selection |
| toggleRowSelection | toggle if a certain row is selected. With the second parameter, you can directly set if this row is selected | row, selected |
| clearSelection | used in multiple selection Table, clear selection, might be useful when `reserve-selection` is on | selection |
| toggleRowSelection | used in multiple selection Table, toggle if a certain row is selected. With the second parameter, you can directly set if this row is selected | row, selected |
| setCurrentRow | used in single selection Table, set a certain row selected. If called without any parameter, it will clear selection. | row |