diff --git a/src/components/SelectInput.vue b/src/components/SelectInput.vue index 0785941..17976c7 100644 --- a/src/components/SelectInput.vue +++ b/src/components/SelectInput.vue @@ -43,7 +43,7 @@ const select = (item?: T) => { const submit = () => { if (currentIndex.value >= 0 && currentIndex.value < props.items.length) { select(props.items[currentIndex.value]); - } else if (modelValue.value === undefined && props.items.length > 0) { + } else if (props.items.length > 0) { select(props.items[0]); } }; diff --git a/src/market/type/MarketTypeInput.vue b/src/market/type/MarketTypeInput.vue index 9d37962..e3b3665 100644 --- a/src/market/type/MarketTypeInput.vue +++ b/src/market/type/MarketTypeInput.vue @@ -55,7 +55,7 @@ const submit = async () => { select(v); await nextTick(); - } else if (modelValue.value === undefined && suggestions.value.length > 0) { + } else if (suggestions.value.length > 0) { select(suggestions.value[0]); await nextTick(); } @@ -92,7 +92,7 @@ watchEffect(async () => { -
+