From c79d79ad937ecbda68ac4402a297ebfbea59052e Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Wed, 25 Oct 2023 18:22:15 +0300 Subject: [PATCH] Update toast samples --- doc/toast/BasicDoc.vue | 4 +- doc/toast/MultipleDoc.vue | 1 - doc/toast/PositionDoc.vue | 22 ++++----- doc/toast/SeverityDoc.vue | 10 ++-- doc/toast/StickyDoc.vue | 14 +++--- doc/toast/TemplateDoc.vue | 89 +++++++++++++---------------------- doc/toast/ToastServiceDoc.vue | 2 +- 7 files changed, 58 insertions(+), 84 deletions(-) diff --git a/doc/toast/BasicDoc.vue b/doc/toast/BasicDoc.vue index a3b7aac19..fcb43a85a 100644 --- a/doc/toast/BasicDoc.vue +++ b/doc/toast/BasicDoc.vue @@ -1,8 +1,8 @@ @@ -124,17 +112,12 @@ const visible = ref(false); const showTemplate = () => { if (!visible.value) { - toast.add({ severity: 'warn', summary: 'Are you sure?', detail: 'Proceed to confirm', group: 'bc' }); + toast.add({ severity: 'success', summary: 'Can you send me the report?', group: 'bc' }); visible.value = true; } }; -const onConfirm = () => { - toast.removeGroup('bc'); - visible.value = false; -} - -const onReject = () => { +const onReply = () => { toast.removeGroup('bc'); visible.value = false; } @@ -150,15 +133,11 @@ const onClose = () => { methods: { showTemplate() { if (!this.visible) { - this.$toast.add({ severity: 'warn', summary: 'Are you sure?', detail: 'Proceed to confirm', group: 'bc' }); + this.$toast.add({ severity: 'success', summary: 'Can you send me the report?', group: 'bc' }); this.visible = true; } }, - onConfirm() { - this.$toast.removeGroup('bc'); - this.visible = false; - }, - onReject() { + onReply() { this.$toast.removeGroup('bc'); this.visible = false; }, diff --git a/doc/toast/ToastServiceDoc.vue b/doc/toast/ToastServiceDoc.vue index b58559160..e9f344c42 100644 --- a/doc/toast/ToastServiceDoc.vue +++ b/doc/toast/ToastServiceDoc.vue @@ -4,7 +4,7 @@
-

$toast is available as a property in the application instance for Options API. The service can be injected with the useToast function for Composition API.

+

The service is available with the useToast function for Composition API or using the $toast property of the application for Options API.