|
|
@ -12,19 +12,21 @@ const isCopied = ref({ |
|
|
|
embed: false, |
|
|
|
embed: false, |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { copy } = useCopy() |
|
|
|
|
|
|
|
|
|
|
|
const openUrl = async () => { |
|
|
|
const openUrl = async () => { |
|
|
|
window.open(url.value, '_blank', 'noopener,noreferrer') |
|
|
|
window.open(url.value, '_blank', 'noopener,noreferrer') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const embedHtml = async () => { |
|
|
|
const embedHtml = async () => { |
|
|
|
await navigator.clipboard.writeText(`<iframe src="${url.value}" width="100%" height="100%" style="border: none;"></iframe>`) |
|
|
|
await copy(`<iframe src="${url.value}" width="100%" height="100%" style="border: none;"></iframe>`) |
|
|
|
isCopied.value.embed = true |
|
|
|
isCopied.value.embed = true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const copyUrl = async () => { |
|
|
|
const copyUrl = async () => { |
|
|
|
isCopied.value.link = false |
|
|
|
isCopied.value.link = false |
|
|
|
|
|
|
|
|
|
|
|
await navigator.clipboard.writeText(url.value) |
|
|
|
await copy(url.value) |
|
|
|
|
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
setTimeout(() => { |
|
|
|
isCopied.value.link = true |
|
|
|
isCopied.value.link = true |
|
|
|