From 67d95f9ad0d296b9704ccaa63a0ef7989da0af22 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 25 Jan 2024 14:44:41 +0100 Subject: [PATCH] refs #6664 vnConfirm og --- src/components/ui/VnConfirm.vue | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/components/ui/VnConfirm.vue b/src/components/ui/VnConfirm.vue index 0ce18cadb..f8715f685 100644 --- a/src/components/ui/VnConfirm.vue +++ b/src/components/ui/VnConfirm.vue @@ -2,7 +2,6 @@ import { ref } from 'vue'; import { useDialogPluginComponent } from 'quasar'; import { useI18n } from 'vue-i18n'; -import { onMounted } from 'vue'; const { t } = useI18n(); @@ -29,7 +28,6 @@ const props = defineProps({ required: false, default: null, }, - callbackFn: Function, }); defineEmits(['confirm', ...useDialogPluginComponent.emits]); @@ -39,17 +37,12 @@ const { dialogRef, onDialogOK } = useDialogPluginComponent(); const title = props.title || t('Confirm'); const message = props.message || t('Are you sure you want to continue?'); const isLoading = ref(false); -onMounted(() => { - if (props.callbackFn) props.callbackFn(); -}); + async function confirm() { - let html = null; - html = document.getElementById(props.data.inputId); isLoading.value = true; if (props.promise) { try { - if (html) await props.promise({ ...props.data, return: html.value }); - else await props.promise(props.data); + await props.promise(props.data); } finally { isLoading.value = false; } @@ -72,8 +65,8 @@ async function confirm() { - - + +