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