feat: supported copy to clipboard utlity
This commit is contained in:
@@ -90,6 +90,7 @@ import { codegens } from "~/helpers/codegen/codegen"
|
||||
import { getRESTRequest } from "~/newstore/RESTSession"
|
||||
import { getEffectiveRESTRequest } from "~/helpers/utils/EffectiveURL"
|
||||
import { getCurrentEnvironment } from "~/newstore/environments"
|
||||
import { copyToClipboard } from "~/helpers/utils/clipboard"
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
@@ -151,7 +152,7 @@ export default defineComponent({
|
||||
this.$emit("handle-import")
|
||||
},
|
||||
copyRequestCode() {
|
||||
;(this.$clipboard as any)(this.requestCode)
|
||||
copyToClipboard(this.requestCode)
|
||||
this.copyIcon = "done"
|
||||
this.$toast.success(this.$t("copied_to_clipboard").toString(), {
|
||||
icon: "done",
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
|
||||
<script>
|
||||
import TextContentRendererMixin from "./mixins/TextContentRendererMixin"
|
||||
import { copyToClipboard } from "~/helpers/utils/clipboard"
|
||||
|
||||
export default {
|
||||
mixins: [TextContentRendererMixin],
|
||||
@@ -102,7 +103,7 @@ export default {
|
||||
}, 1000)
|
||||
},
|
||||
copyResponse() {
|
||||
this.$clipboard(this.responseBodyText)
|
||||
copyToClipboard(this.responseBodyText)
|
||||
this.copyIcon = "done"
|
||||
this.$toast.success(this.$t("copied_to_clipboard"), {
|
||||
icon: "done",
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
|
||||
<script>
|
||||
import TextContentRendererMixin from "./mixins/TextContentRendererMixin"
|
||||
import { copyToClipboard } from "~/helpers/utils/clipboard"
|
||||
|
||||
export default {
|
||||
mixins: [TextContentRendererMixin],
|
||||
@@ -104,7 +105,7 @@ export default {
|
||||
}, 1000)
|
||||
},
|
||||
copyResponse() {
|
||||
this.$clipboard(this.responseBodyText)
|
||||
copyToClipboard(this.responseBodyText)
|
||||
this.copyIcon = "done"
|
||||
this.$toast.success(this.$t("copied_to_clipboard"), {
|
||||
icon: "done",
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
|
||||
<script>
|
||||
import TextContentRendererMixin from "./mixins/TextContentRendererMixin"
|
||||
import { copyToClipboard } from "~/helpers/utils/clipboard"
|
||||
|
||||
export default {
|
||||
mixins: [TextContentRendererMixin],
|
||||
@@ -95,7 +96,7 @@ export default {
|
||||
}, 1000)
|
||||
},
|
||||
copyResponse() {
|
||||
this.$clipboard(this.responseBodyText)
|
||||
copyToClipboard(this.responseBodyText)
|
||||
this.copyIcon = "done"
|
||||
this.$toast.success(this.$t("copied_to_clipboard"), {
|
||||
icon: "done",
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
|
||||
<script>
|
||||
import TextContentRendererMixin from "./mixins/TextContentRendererMixin"
|
||||
import { copyToClipboard } from "~/helpers/utils/clipboard"
|
||||
|
||||
export default {
|
||||
mixins: [TextContentRendererMixin],
|
||||
@@ -95,7 +96,7 @@ export default {
|
||||
}, 1000)
|
||||
},
|
||||
copyResponse() {
|
||||
this.$clipboard(this.responseBodyText)
|
||||
copyToClipboard(this.responseBodyText)
|
||||
this.copyIcon = "done"
|
||||
this.$toast.success(this.$t("copied_to_clipboard"), {
|
||||
icon: "done",
|
||||
|
||||
Reference in New Issue
Block a user