mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
14 lines
377 B
JavaScript
14 lines
377 B
JavaScript
export default {
|
|
methods: {
|
|
itemSelected() {
|
|
const item = this.dtComponent.selectedRows.find((i) => (i.id === this.params.id));
|
|
|
|
if (item) {
|
|
this.dtComponent.selectedRows = this.dtComponent.selectedRows
|
|
.filter((i) => (i.id !== this.params.id));
|
|
} else {
|
|
this.dtComponent.selectedRows.push(this.params);
|
|
}
|
|
},
|
|
},
|
|
};
|