From 613ebc0eb4f93ea25f32260f71e91d0c7bf43c5b Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 29 Jan 2025 11:58:19 +0100 Subject: [PATCH] refactor: refs #8409 use defineModel instead or defineProps --- src/components/common/VnSelectSupplier.vue | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/components/common/VnSelectSupplier.vue b/src/components/common/VnSelectSupplier.vue index 3a4572f52..990c3744d 100644 --- a/src/components/common/VnSelectSupplier.vue +++ b/src/components/common/VnSelectSupplier.vue @@ -2,17 +2,11 @@ import { computed } from 'vue'; import VnSelect from 'components/common/VnSelect.vue'; -const emit = defineEmits(['update:modelValue']); -const $props = defineProps({ - modelValue: { - type: [String, Number, Object], - default: null, - }, -}); +const model = defineModel({ type: [String, Number, Object] }); const url = 'Suppliers'; const value = computed({ get() { - return $props.modelValue; + return model; }, set(val) { emit('update:modelValue', val); @@ -24,7 +18,7 @@ const value = computed({