|
|
|
@ -12,19 +12,21 @@ const isCopied = ref({
|
|
|
|
|
embed: false, |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const { copy } = useCopy() |
|
|
|
|
|
|
|
|
|
const openUrl = async () => { |
|
|
|
|
window.open(url.value, '_blank', 'noopener,noreferrer') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
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 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const copyUrl = async () => { |
|
|
|
|
isCopied.value.link = false |
|
|
|
|
|
|
|
|
|
await navigator.clipboard.writeText(url.value) |
|
|
|
|
await copy(url.value) |
|
|
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
isCopied.value.link = true |
|
|
|
|