+
@@ -23,6 +15,7 @@
mounted() {
this.highlightCode();
},
+
methods: {
highlightCode() {
this.$nextTick(() => {
@@ -31,6 +24,6 @@
});
});
},
- }
+ },
}
-
\ No newline at end of file
+
diff --git a/src/components/Utilities/ViewComponent.vue b/src/components/Utilities/ViewComponent.vue
index a89bab4..f824e15 100644
--- a/src/components/Utilities/ViewComponent.vue
+++ b/src/components/Utilities/ViewComponent.vue
@@ -23,20 +23,30 @@
-
+
-
@@ -63,7 +73,8 @@
return {
viewCode: false,
rtl: false,
- code: null
+ copy: false,
+ code: null,
}
},
created() {
@@ -72,5 +83,23 @@
this.code = beautify_html(document.getElementById(id).innerHTML);
});
},
+ methods: {
+ onCopy() {
+ this.copy = ! this.copy;
+
+ setTimeout(() => {
+ this.copy = false
+ }, 2000);
+ },
+ },
}
-
\ No newline at end of file
+
+
+
\ No newline at end of file