From 0d718448e22e1ad19350fa451fb41cb24e8b8408 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 21 Jun 2024 13:09:34 +0200 Subject: [PATCH 01/41] perf: approach --- src/components/FormModel.vue | 10 +++++++--- src/components/FormModelPopup.vue | 1 + src/components/common/VnInput.vue | 8 +------- src/components/common/VnSelect.vue | 2 -- src/composables/useValidator.js | 2 +- src/i18n/locale/en.yml | 2 +- src/i18n/locale/es.yml | 3 +++ 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index f10dee61a..4cc5d38ee 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -22,7 +22,7 @@ const { t } = useI18n(); const { validate } = useValidator(); const { notify } = useNotify(); const route = useRoute(); - +const myForm = ref(null); const $props = defineProps({ url: { type: String, @@ -106,11 +106,14 @@ const defaultButtons = computed(() => ({ color: 'primary', icon: 'save', label: 'globals.save', + click: () => myForm.value.submit(), + type: 'submit', }, reset: { color: 'primary', icon: 'restart_alt', label: 'globals.reset', + click: () => reset(), }, ...$props.defaultButtons, })); @@ -262,6 +265,7 @@ defineExpose({