diff --git a/src/components/project/ProjectNumber.vue b/src/components/project/ProjectNumber.vue index ec6d74ab..86973067 100644 --- a/src/components/project/ProjectNumber.vue +++ b/src/components/project/ProjectNumber.vue @@ -11,7 +11,7 @@ :options="options" showSearch allowClear - @select="handleSelect" + @change="handleChange" > @@ -25,19 +25,20 @@ const props = defineProps({ }) const emit = defineEmits(['update:value','update:label']) const store = useStore(); -const numValue = ref(props.value) -const handleSelect = (value,option) => { - emit('update:value',value) - emit('update:label',option.id) -}; +const numValue = ref(props.value||null) +const handleChange = (value,option)=>{ + emit('update:value',value || '') + emit('update:label',option?.label || '') +} onMounted(() => { - // console.log(store.state.project_number,'xixixixii') + // console.log(store.state.project_number,'store.state.project_number') }); -const options = ref([ - {id:4,value:1,label:1}, - {id:5,value:2,label:2}, - {id:6,value:3,label:3}, -]) +const options = computed(()=>store.state.project_number.map(e => { + return{ + value: e.value, + label: e.name + } +}))