From f8a886cefc32710bf71793572d9d6d7099475115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=8C=E8=90=8C=E5=93=92=E8=B5=AB=E8=90=9D?= Date: Sun, 21 May 2023 00:02:15 +0800 Subject: [PATCH] :bug: Fix: fixed the issue where bulk copying links was not functioning properly --- src/renderer/manage/pages/bucketPage.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/renderer/manage/pages/bucketPage.vue b/src/renderer/manage/pages/bucketPage.vue index dbd6998..d691140 100644 --- a/src/renderer/manage/pages/bucketPage.vue +++ b/src/renderer/manage/pages/bucketPage.vue @@ -162,7 +162,7 @@ ea/* size="25px" :color="selectedItems.length > 0 ? 'red' : 'gray'" style="margin-left: 10px;" - @click="handleBatchCopyLink(manageStore.config.settings.customPasteFormat)" + @click="handleBatchCopyLink(manageStore.config.settings.pasteFormat)" > @@ -2741,7 +2741,8 @@ async function handleBatchCopyLink (type: string) { return } const result = [] as string[] - selectedItems.forEach(async (item: any) => { + for (let i = 0; i < selectedItems.length; i++) { + const item = selectedItems[i] if (!item.isDir) { if (type !== 'preSignedUrl') { result.push(await formatLink(item.url, item.fileName, type, manageStore.config.settings.customPasteFormat)) @@ -2756,7 +2757,7 @@ async function handleBatchCopyLink (type: string) { }) } } - }) + } if (type !== 'preSignedUrl') { clipboard.writeText(result.join('\n')) ElMessage.success(`${$T('MANAGE_BUCKET_BATCH_COPY_URL_MSG_A')} ${result.length} ${$T('MANAGE_BUCKET_BATCH_COPY_URL_MSG_B')}`)