From ca6547e174b12865105cd819ccb3f1ccedf47803 Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 28 Oct 2024 07:48:11 +0100 Subject: [PATCH 1/3] feat: refs #7970 notify changes --- src/components/ui/VnConfirm.vue | 23 ++++++--- src/pages/Ticket/Card/TicketSale.vue | 76 ++++++++++++++++++++++++++-- 2 files changed, 89 insertions(+), 10 deletions(-) diff --git a/src/components/ui/VnConfirm.vue b/src/components/ui/VnConfirm.vue index 4fa374b62..0fbc55cfb 100644 --- a/src/components/ui/VnConfirm.vue +++ b/src/components/ui/VnConfirm.vue @@ -30,10 +30,10 @@ const props = defineProps({ }, }); -defineEmits(['confirm', ...useDialogPluginComponent.emits]); -defineExpose({ show: () => dialogRef.value.show(), hide: () => dialogRef.value.hide() }); +defineEmits([...useDialogPluginComponent.emits]); -const { dialogRef, onDialogOK } = useDialogPluginComponent(); +const { dialogRef, onDialogHide, onDialogOK, onDialogCancel } = + useDialogPluginComponent(); const title = props.title || t('Confirm'); const message = @@ -53,9 +53,13 @@ async function confirm() { } onDialogOK(props.data); } + +function cancel() { + onDialogCancel(); +}