mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-02-02 19:18:13 -05:00
🐛 Fix: fixed the issue where bulk copying links was not functioning properly
This commit is contained in:
parent
bd9e33c0d8
commit
f8a886cefc
@ -162,7 +162,7 @@ ea/*
|
|||||||
size="25px"
|
size="25px"
|
||||||
:color="selectedItems.length > 0 ? 'red' : 'gray'"
|
:color="selectedItems.length > 0 ? 'red' : 'gray'"
|
||||||
style="margin-left: 10px;"
|
style="margin-left: 10px;"
|
||||||
@click="handleBatchCopyLink(manageStore.config.settings.customPasteFormat)"
|
@click="handleBatchCopyLink(manageStore.config.settings.pasteFormat)"
|
||||||
>
|
>
|
||||||
<Link />
|
<Link />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
@ -2741,7 +2741,8 @@ async function handleBatchCopyLink (type: string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
const result = [] as string[]
|
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 (!item.isDir) {
|
||||||
if (type !== 'preSignedUrl') {
|
if (type !== 'preSignedUrl') {
|
||||||
result.push(await formatLink(item.url, item.fileName, type, manageStore.config.settings.customPasteFormat))
|
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') {
|
if (type !== 'preSignedUrl') {
|
||||||
clipboard.writeText(result.join('\n'))
|
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')}`)
|
ElMessage.success(`${$T('MANAGE_BUCKET_BATCH_COPY_URL_MSG_A')} ${result.length} ${$T('MANAGE_BUCKET_BATCH_COPY_URL_MSG_B')}`)
|
||||||
|
Loading…
Reference in New Issue
Block a user