fix: 修复 registered 卡片 checkbox 无法勾选的问题

问题:
- 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)
This commit is contained in:
2026-10-08 00:12:16 +08:00
parent 73532c2e3e
commit 53e23037ec

View File

@@ -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)