Skip to content

Commit

Permalink
fix(comp: select): Add string to the type of label
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzaijiang committed May 12, 2022
1 parent 9ba3eca commit 3f4243d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/components/select/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export interface SelectOptionProps {

disabled?: boolean
key?: VKey
label?: string
label?: string | number

customLabel?: string | ((data: SelectOptionProps) => VNodeChild)

Expand All @@ -157,7 +157,7 @@ export interface SelectOptionGroupProps {

children?: SelectOptionProps[]
key?: VKey
label?: string
label?: string | number

customLabel?: string | ((data: SelectOptionGroupProps) => VNodeChild)

Expand All @@ -182,14 +182,14 @@ export type SelectorProps = ExtractInnerPropTypes<typeof optionProps>
export const optionProps = {
disabled: Boolean,
index: { type: Number, required: true },
label: String,
label: { type: [String, Number], required: true },
rawData: { type: Object as PropType<SelectOptionProps>, required: true },
parentKey: { type: [String, Number, Symbol] as PropType<VKey>, default: undefined },
} as const
export type OptionProps = ExtractInnerPropTypes<typeof optionProps>

export const optionGroupProps = {
label: String,
label: { type: [String, Number], required: true },
index: { type: Number, required: true },
rawData: { type: Object as PropType<SelectOptionGroupProps>, required: true },
} as const
Expand Down

0 comments on commit 3f4243d

Please sign in to comment.