feat: migrate all copy to clipboard actions to v-clipboard

This commit is contained in:
liyasthomas
2021-07-27 18:17:41 +05:30
parent 37ad8e08fc
commit 78fccc8583
21 changed files with 120 additions and 129 deletions

View File

@@ -276,12 +276,7 @@ export default defineComponent({
.then(() => {})
.catch(() => {})
} else {
const dummy = document.createElement("input")
document.body.appendChild(dummy)
dummy.value = window.location.href
dummy.select()
document.execCommand("copy")
document.body.removeChild(dummy)
this.$clipboard(window.location.href)
this.$toast.info(this.$t("copied_to_clipboard"), {
icon: "done",
})