diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index 8787371bc..a7af0044b 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -101,16 +101,16 @@ onMounted(async () => { }); onBeforeRouteLeave((to, from, next) => { - if (!hasChanges.value) next(); - - quasar.dialog({ - component: VnConfirm, - componentProps: { - title: t('Unsaved changes will be lost'), - message: t('Are you sure exit without saving?'), - promise: () => next(), - }, - }); + if (hasChanges.value) + quasar.dialog({ + component: VnConfirm, + componentProps: { + title: t('Unsaved changes will be lost'), + message: t('Are you sure exit without saving?'), + promise: () => next(), + }, + }); + else next(); }); onUnmounted(() => { diff --git a/src/components/common/VnCurrency.vue b/src/components/common/VnCurrency.vue index 660c4e979..b892e5012 100644 --- a/src/components/common/VnCurrency.vue +++ b/src/components/common/VnCurrency.vue @@ -5,7 +5,7 @@ import { useCapitalize } from 'src/composables/useCapitalize'; import VnInput from 'src/components/common/VnInput.vue'; const props = defineProps({ - modelValue: { type: String, default: '' }, + modelValue: { type: [String, Number], default: '' }, }); const { t } = useI18n();