From 73c5e0f1f4b89a50ee0e4d2850a9c3efd30b7260 Mon Sep 17 00:00:00 2001 From: alexm Date: Fri, 12 Jul 2024 13:34:31 +0200 Subject: [PATCH] fix: formModelPoup defaultActions false --- src/components/FormModel.vue | 132 +++++++++++++++--------------- src/components/FormModelPopup.vue | 6 +- 2 files changed, 65 insertions(+), 73 deletions(-) diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index becc1c174..758ddd433 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -90,7 +90,7 @@ const $props = defineProps({ }); const emit = defineEmits(['onFetch', 'onDataSaved']); const modelValue = computed( - () => $props.model ?? `formModel_${route?.meta?.title ?? route.name}`, + () => $props.model ?? `formModel_${route?.meta?.title ?? route.name}` ).value; const componentIsRendered = ref(false); const arrayData = useArrayData(modelValue); @@ -137,7 +137,7 @@ onMounted(async () => { JSON.stringify(newVal) !== JSON.stringify(originalData.value); isResetting.value = false; }, - { deep: true }, + { deep: true } ); } }); @@ -145,7 +145,7 @@ onMounted(async () => { if (!$props.url) watch( () => arrayData.store.data, - (val) => updateAndEmit('onFetch', val), + (val) => updateAndEmit('onFetch', val) ); watch(formUrl, async () => { @@ -239,7 +239,7 @@ function filter(value, update, filterOptions) { (ref) => { ref.setOptionIndex(-1); ref.moveOptionSelection(1, true); - }, + } ); } @@ -261,13 +261,7 @@ defineExpose({