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