修复可能的错误

This commit is contained in:
ivamp 2023-12-11 00:23:48 +08:00
parent cb934c3444
commit a5578bf1d6

View File

@ -133,17 +133,17 @@ const goto = (libraryId) => {
}; };
function isSelected(id) { function isSelected(id) {
return this.selected_ids.includes(id); return selected_ids.value.includes(id);
} }
function toggleSelection(id) { function toggleSelection(id) {
const index = this.selected_ids.indexOf(id); const index = selected_ids.value.indexOf(id);
if (index !== -1) { if (index !== -1) {
// //
this.selected_ids.splice(index, 1); selected_ids.value.splice(index, 1);
} else { } else {
// //
this.selected_ids.push(id); selected_ids.value.push(id);
} }
} }