mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-06-08 17:20:00 +08:00
🐛 Fix: fix copy link bug
This commit is contained in:
@@ -30,13 +30,15 @@ export default async (style: IPasteStyle, item: ImgInfo, customLink: string | un
|
||||
if (useShortUrl) {
|
||||
url = await generateShortUrl(url)
|
||||
}
|
||||
const copyedItem = JSON.parse(JSON.stringify(item))
|
||||
copyedItem.url = url
|
||||
const _customLink = customLink || ''
|
||||
const tpl = {
|
||||
markdown: ``,
|
||||
HTML: `<img src="${url}"/>`,
|
||||
URL: url,
|
||||
UBB: `[IMG]${url}[/IMG]`,
|
||||
Custom: formatCustomLink(_customLink, item)
|
||||
Custom: formatCustomLink(_customLink, copyedItem)
|
||||
}
|
||||
return tpl[style]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user