From 228b85de660e9bfaaf4439997f1836fc88c037db Mon Sep 17 00:00:00 2001 From: qlin Date: Tue, 11 Jul 2023 15:42:49 +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=20(#341)?= 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; } });