From f305afb4cce87dcf82437e11f7fc892884bdc15c Mon Sep 17 00:00:00 2001 From: wanghansong Date: Tue, 14 Jun 2022 00:02:35 +0800 Subject: [PATCH] fix: remove object key --- packages/components/src/select/index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/components/src/select/index.ts b/packages/components/src/select/index.ts index e3bac1d..83c90a0 100644 --- a/packages/components/src/select/index.ts +++ b/packages/components/src/select/index.ts @@ -31,12 +31,16 @@ const SelectOption = defineComponent({ default: () => options.map((option: any) => { if (typeof option === 'string') { - return h(ElOption, { key: option, value: option, label: option }, slots) + return h( + ElOption, + { key: option, value: option, label: option }, + slots + ) } else { return h( ElOption, { - key: option.value || option, + key: option.value, ...option, }, slots