@varlet/ui 3.3.2 → 3.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/types/select.d.ts CHANGED
@@ -9,8 +9,23 @@ export type SelectTextAlign = 'left' | 'right' | 'center'
9
9
 
10
10
  export type SelectSize = 'small' | 'normal'
11
11
 
12
+ export type SelectOptionLabelRender = (option: SelectOption, checked: boolean) => VNodeChild
13
+
14
+ export type SelectOptionLabel = string | VNode | SelectOptionLabelRender
15
+
16
+ export interface SelectOption {
17
+ label?: SelectOptionLabel
18
+ value?: any
19
+ disabled?: boolean
20
+
21
+ [key: PropertyKey]: any
22
+ }
23
+
12
24
  export interface SelectProps extends BasicAttributes {
13
25
  modelValue?: any
26
+ options?: Array<SelectOption>
27
+ labelKey?: string
28
+ valueKey?: string
14
29
  variant?: SelectVariant
15
30
  size?: SelectSize
16
31
  placeholder?: string