From 87dcc9c4bc2e5abb2a9a696810a770d9fb791559 Mon Sep 17 00:00:00 2001 From: winixt Date: Sat, 8 Jul 2023 20:06:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20select=20=E5=85=BC=E5=AE=B9=20options=20?= =?UTF-8?q?=E4=B8=BA=20null=20=E7=9A=84=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/select/select.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/select/select.vue b/components/select/select.vue index 5d81a090..399e142a 100644 --- a/components/select/select.vue +++ b/components/select/select.vue @@ -185,7 +185,7 @@ export default defineComponent({ }; const baseOptions = computed(() => { - const allOptions = [...childOptions, ...props.options]; + const allOptions = [...childOptions, ...(props.options || [])]; return allOptions.map((option) => { return { ...option, @@ -428,6 +428,7 @@ export default defineComponent({ hoverOptionValue.value = option.value; } } else { + // eslint-disable-next-line no-undefined hoverOptionValue.value = undefined; } });