From 53e23037ec3e27a821d3cd1b3faddecf603bb549 Mon Sep 17 00:00:00 2001 From: Momentry Studio Date: Thu, 8 Oct 2026 00:12:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20registered=20?= =?UTF-8?q?=E5=8D=A1=E7=89=87=20checkbox=20=E6=97=A0=E6=B3=95=E5=8B=BE?= =?UTF-8?q?=E9=80=89=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题: - toggleSelect 函数使用 'f.file_path || f.file_uuid' 作为 key - 对于 registered 文件,如果有 file_path 属性,会优先使用 file_path - 但是 is-selected class 和 checkbox 显示都检查 file_uuid - 导致 selectedFiles 中存的是 file_path,但检查的是 file_uuid,不匹配 修复: - 修改 toggleSelect 函数,优先使用 file_uuid('f.file_uuid || f.file_path') - 对于 registered 文件,确保使用 file_uuid - 对于 unregistered 文件,使用 file_path(因为没有 file_uuid) --- src/views/LibraryView.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/LibraryView.vue b/src/views/LibraryView.vue index dafc9d2..5788938 100644 --- a/src/views/LibraryView.vue +++ b/src/views/LibraryView.vue @@ -1039,7 +1039,7 @@ function handleThumbError(e: Event) { } function toggleSelect(f: any) { - const key = f.file_path || f.file_uuid + const key = f.file_uuid || f.file_path const idx = selectedFiles.value.indexOf(key) if (idx >= 0) selectedFiles.value.splice(idx, 1) else selectedFiles.value.push(key)