#8409: Added VnSelectSupplier #1274

Merged
jon merged 10 commits from 8409-VnSelectSupplier into dev 2025-01-30 14:20:07 +00:00
1 changed files with 3 additions and 9 deletions
Showing only changes of commit 613ebc0eb4 - Show all commits

View File

@ -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';
jon marked this conversation as resolved
Review

nos hace falta defineProps? Porque no defineModel?
Al actualziar el valor ya emite no?
Me vaso para este comentario en VnInputNumber o VnRadio

nos hace falta defineProps? Porque no defineModel? Al actualziar el valor ya emite no? Me vaso para este comentario en VnInputNumber o VnRadio
Review

Okey @jon, queda resolver esto

Okey @jon, queda resolver esto
const value = computed({
get() {
return $props.modelValue;
return model;
},
set(val) {
emit('update:modelValue', val);
@ -24,7 +18,7 @@ const value = computed({
<VnSelect
:label="$t('globals.supplier')"
v-bind="$attrs"
v-model="value"
v-model="model"
:url="url"
option-value="id"
option-label="nickname"