We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccb951e commit 21fae71Copy full SHA for 21fae71
src/demo/CodeGen.vue
@@ -68,6 +68,7 @@ watch(
68
}
69
);
70
71
+const copied = ref(false);
72
const initializing = ref(true);
73
const optionCode = ref("");
74
const transformedCode = ref("");
@@ -136,13 +137,22 @@ const importCode = computed(() => {
136
137
138
});
139
140
+watch(importCode, () => {
141
+ copied.value = false;
142
+});
143
+
144
// copy message
145
const messageOpen = ref(false);
146
let messageTimer;
147
148
function trackCopy(from) {
149
+ if (copied.value) {
150
+ // only track copy after modifications
151
+ return;
152
+ }
153
154
+ copied.value = true;
155
track("copy-code", { from });
- console.log("copied");
156
157
158
function copy() {
0 commit comments