Skip to content

Commit

Permalink
fix(comp: select): Add number 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 e9bb42b commit 9403c0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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
2 changes: 1 addition & 1 deletion packages/pro/tree/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const proTreeProps = {
empty: { type: [String, Object] as PropType<string | EmptyProps>, default: undefined },
expandIcon: {
type: [String, Array] as PropType<string | [string, string]>,
default: ['minus-square', 'plus-square'],
default: () => ['minus-square', 'plus-square'],
},
getKey: { type: [String, Function] as PropType<string | ((data: TreeNode) => VKey)>, default: undefined },
header: { type: [String, Object] as PropType<string | HeaderProps>, default: undefined },
Expand Down

0 comments on commit 9403c0d

Please sign in to comment.