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

@@ -41,7 +41,7 @@
:provide-j-s-o-n-outline="true"
:options="{
maxLines: Infinity,
minLines: '16',
minLines: 16,
fontSize: '12px',
autoScrollEditorIntoView: true,
readOnly: true,
@@ -113,13 +113,7 @@ export default {
}, 1000)
},
copyResponse() {
const aux = document.createElement("textarea")
const copy = this.responseBodyText
aux.innerText = copy
document.body.appendChild(aux)
aux.select()
document.execCommand("copy")
document.body.removeChild(aux)
this.$clipboard(this.responseBodyText)
this.copyIcon = "done"
this.$toast.success(this.$t("copied_to_clipboard"), {
icon: "done",