Skip to content

Commit

Permalink
fix: remove object key
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghansong committed Jun 13, 2022
1 parent 6d5eb5b commit f305afb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/components/src/select/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f305afb

Please sign in to comment.