contactstudiocstools 1.0.245 → 1.0.246
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
|
@@ -166,6 +166,7 @@ interface IFaq {
|
|
|
166
166
|
openModal: boolean,
|
|
167
167
|
answer: string,
|
|
168
168
|
question: string,
|
|
169
|
+
copyMessage: string
|
|
169
170
|
}
|
|
170
171
|
const props = defineProps<IProps>();
|
|
171
172
|
|
|
@@ -183,7 +184,8 @@ const visible = ref<boolean>(false);
|
|
|
183
184
|
const faq = ref<IFaq>({
|
|
184
185
|
openModal: false,
|
|
185
186
|
answer: "",
|
|
186
|
-
question: ""
|
|
187
|
+
question: "",
|
|
188
|
+
copyMessage: "Copiado para área de transferência",
|
|
187
189
|
});
|
|
188
190
|
const AtomAlertRef = ref<InstanceType<typeof AtomAlert> | null>(null);
|
|
189
191
|
|
|
@@ -221,11 +223,15 @@ function changeMode(): void {
|
|
|
221
223
|
$emit("darkmode:change")
|
|
222
224
|
}
|
|
223
225
|
async function copy(answer: string): Promise<void> {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
+
$emit("faq:copy", answer);
|
|
227
|
+
setTimeout(() => {
|
|
228
|
+
AtomAlertRef.value?.show("success", faq.value.copyMessage);
|
|
229
|
+
}, 100)
|
|
226
230
|
}
|
|
227
231
|
// emits
|
|
228
232
|
$listen("nav:show", show);
|
|
233
|
+
$listen("faq:modalClose", () => faq.value.openModal = false);
|
|
234
|
+
$listen("faq:copyMessage", (message: string) => faq.value.copyMessage = message);
|
|
229
235
|
</script>
|
|
230
236
|
|
|
231
237
|
<style scoped>
|