forked from vueComponent/ant-design-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathselect.d.ts
252 lines (214 loc) · 5.13 KB
/
select.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
// Project: https://github.com/vueComponent/ant-design-vue
// Definitions by: akki-jat <https://github.com/akki-jat>
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from '../component';
import { Option } from './option';
import { OptionGroup } from './option-group';
import { VNode } from 'vue';
export declare class Select extends AntdComponent {
static Option: typeof Option;
static OptGroup: typeof OptionGroup;
/**
* Show clear button.
* @default false
* @type boolean
*/
allowClear: boolean;
/**
* Whether the current search will be cleared on selecting an item. Only applies when mode is set to multiple or tags.
* @default true
* @type boolean
*/
autoClearSearchValue: boolean;
/**
* Get focus by default
* @default false
* @type boolean
*/
autoFocus: boolean;
/**
* Whether active first option by default
* @default true
* @type boolean
*/
defaultActiveFirstOption: boolean;
/**
* Initial selected option.
* @type string | number | Array<string | number>
*/
defaultValue: string | number | Array<string | number>;
/**
* Whether disabled select
* @default false
* @type boolean
*/
disabled: boolean;
/**
* className of dropdown menu
* @type string
*/
dropdownClassName: string;
/**
* Whether dropdown's width is same with select.
* @default true
* @type boolean
*/
dropdownMatchSelectWidth: boolean;
/**
* Customize dropdown content
* @type function | slot-scope
*/
dropdownRender?: (menu?: VNode, props?: object) => VNode;
/**
* style of dropdown menu
* @type object
*/
dropdownStyle: object;
/**
* If true, filter options by input, if function, filter options against it. The function will receive two arguments, inputValue and option,
* if the function returns true, the option will be included in the filtered set; Otherwise, it will be excluded.
* @default true
* @type boolean | Function
*/
filterOption: boolean | Function;
/**
* Value of action option by default
* @type string | string[]
*/
firstActiveValue: string | string[];
/**
* Parent Node which the selector should be rendered to. Default to body.
* When position issues happen, try to modify it into scrollable content and position it relative.
* @default () => document.body
* @type Function
*/
getPopupContainer: (triggerNode: any) => any;
/**
* whether to embed label in value, turn the format of value from string to {key: string, label: vNodes}
* @default false
* @type boolean
*/
labelInValue: boolean;
/**
* Max tag count to show
* @type number
*/
maxTagCount: number;
/**
* Placeholder for not showing tags
* @type any (slot | Function)
*/
maxTagPlaceholder: any;
/**
* Max text length to show
* @type number
*/
maxTagTextLength: number;
/**
* Set mode of Select
* @default 'default'
* @type string
*/
mode: 'default' | 'multiple' | 'tags';
/**
* Specify content to show when no result matches..
* @default 'Not Found'
* @type any (string | slot)
*/
notFoundContent: any;
/**
* Which prop value of option will be used for filter if filterOption is true
* @default 'value'
* @type string
*/
optionFilterProp: string;
/**
* Which prop value of option will render as content of select.
* @default 'value' for combobox, 'children' for other modes
* @type string
*/
optionLabelProp: string;
/**
* Placeholder of select
* @type any (string | slot)
*/
placeholder: any;
/**
* Whether show search input in single mode.
* @default false
* @type boolean
*/
showSearch: boolean;
/**
* Whether to show the drop-down arrow
* @default true
* @type boolean
*/
showArrow: boolean;
/**
* Size of Select input. default large small
* @default 'default'
* @type string
*/
size: 'default' | 'large' | 'small';
/**
* The custom suffix icon
* @type any (VNode | slot)
*/
suffixIcon: any;
/**
* The custom remove icon
* @type any (VNode | slot)
*/
removeIcon: any;
/**
* The custom clear icon
* @type any (VNode | slot)
*/
clearIcon: any;
/**
* The custom menuItemSelected icon
* @type any (VNode | slot)
*/
menuItemSelectedIcon: any;
/**
* Separator used to tokenize on tag/multiple mode
* @type string[]
*/
tokenSeparators: string[];
/**
* Current selected option.
* @type string | number | Array<string | number>
*/
value: string | number | Array<string | number>;
/**
* Data of the selectOption, manual construction work is no longer needed if this property has been set
* @default []
* @type Array<{ value; label; disabled?; key?; title? }>
*/
options: Array<{
value: any;
label: any;
disabled?: boolean;
key?: any;
title?: any;
}>;
/**
* Initial open state of dropdown
* @type boolean
*/
defaultOpen: boolean;
/**
* Controlled open state of dropdown
* @type boolean
*/
open: boolean;
/**
* remove focus
*/
blur(): void;
/**
* get focus
*/
focus(): void;
}