From 9460e6d4d0b28671e85270426df67274492e6123 Mon Sep 17 00:00:00 2001 From: Hooray <304327508@qq.com> Date: Wed, 25 Mar 2026 22:12:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20`FaSelect`=20options=20?= =?UTF-8?q?=E6=95=B0=E7=BB=84=E4=B8=BA=E7=A9=BA=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/components/FaSelect/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui/components/FaSelect/index.vue b/src/ui/components/FaSelect/index.vue index ac6ea399..28b542c4 100644 --- a/src/ui/components/FaSelect/index.vue +++ b/src/ui/components/FaSelect/index.vue @@ -29,10 +29,10 @@ const value = defineModel() const selectedOption = computed({ get() { - return props.options.find(option => option.value === value.value) ?? props.options[0] + return props.options.length > 0 ? props.options.find(option => option.value === value.value) ?? props.options[0] : null }, set(val) { - value.value = val.value + value.value = val?.value || null }, }) @@ -40,7 +40,7 @@ const selectedOption = computed({