From 72c0fba032a50441cd0a844569ac2c6a8081450a Mon Sep 17 00:00:00 2001 From: Yingyya Date: Wed, 7 Aug 2024 20:48:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9F=A5=E6=89=BE=20file=20id=20?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Parsed.vue | 2 +- src/utils/deal-file-list.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Parsed.vue b/src/pages/Parsed.vue index 5e612d5..8cbeacf 100644 --- a/src/pages/Parsed.vue +++ b/src/pages/Parsed.vue @@ -202,7 +202,7 @@ const onWorkerMessage = async (m: WorkerResponse) => { } if (m.type === 'success') { if (downloadType.value.code === 'jsonrpc') { - const file = selectedFiles.value.find(f => f.fs_id === m!!.body!!.filefsid); + const file = selectedFiles.value.find(f => String(f.fs_id) === String(m!!.body!!.filefsid)); if (file === undefined) { message.warn(`${m!!.body!!.filename} 下载失败,请刷新页面后重试!`); return; diff --git a/src/utils/deal-file-list.ts b/src/utils/deal-file-list.ts index e3c208c..fc43b43 100644 --- a/src/utils/deal-file-list.ts +++ b/src/utils/deal-file-list.ts @@ -17,7 +17,7 @@ export function dealFileList(files: File[]) { size: file.size, icon: `pi ${dir ? 'pi-folder' : 'pi-file'}`, fs_id: file.fs_id, - } + }; }); return { tree,