From 34c3aa25da8d9ec07a1242e3a4ee8000e8b60fd4 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Fri, 21 Jun 2024 12:17:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=88=AE=E5=89=8A?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=B8=AD=E7=9A=84=E8=B7=AF=E5=BE=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/filebrowser/FileList.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/filebrowser/FileList.vue b/src/components/filebrowser/FileList.vue index f67ece5b..3d8142d6 100644 --- a/src/components/filebrowser/FileList.vue +++ b/src/components/filebrowser/FileList.vue @@ -396,7 +396,7 @@ watch( props: { prependIcon: 'mdi-auto-fix', click: (_item: FileItem) => { - scrape(_item.path || '') + scrape(_item) }, }, }, @@ -456,30 +456,30 @@ async function recognize(path: string) { } // 调用API刮削 -async function scrape(path: string, confirm: boolean = true) { +async function scrape(item: FileItem, confirm: boolean = true) { try { if (confirm) { // 确认 const confirmed = await createConfirm({ title: '确认', - content: `是否确认刮削 ${path}?`, + content: `是否确认刮削 ${item.path}?`, }) if (!confirmed) return } // 显示进度条 progressDialog.value = true - progressText.value = `正在刮削 ${path} ...` + progressText.value = `正在刮削 ${item.path} ...` const result: { [key: string]: any } = await api.get('media/scrape', { params: { - path, + ...item, storage: inProps.storage, }, }) // 关闭进度条 progressDialog.value = false if (!result.success) $toast.error(result.message) - else $toast.success(`${path} 削刮完成!`) + else $toast.success(`${item.path} 削刮完成!`) } catch (error) { console.error(error) } @@ -495,7 +495,7 @@ async function batchScrape() { if (!confirmed) return selected.value.map(item => { - scrape(item.path || '', false) + scrape(item, false) }) } @@ -646,7 +646,7 @@ onMounted(() => {