|
3 | 3 | // Definitions: https://github.com/vueComponent/ant-design-vue/types
|
4 | 4 |
|
5 | 5 | import { AntdComponent } from './component';
|
| 6 | +import { CSSProperties } from 'vue'; |
6 | 7 |
|
7 | 8 | export declare type Value = { key: string };
|
8 | 9 |
|
9 | 10 | export declare type SelectValue = string | number | Value | Array<Value | string | number>;
|
10 | 11 |
|
11 | 12 | export declare class AutoComplete extends AntdComponent {
|
12 |
| - dropdownMenuStyle: object; |
13 |
| - /** |
14 |
| - * Show clear button, effective in multiple mode only. |
15 |
| - * @default false |
16 |
| - * @type boolean |
17 |
| - */ |
18 |
| - allowClear: boolean; |
19 |
| - |
20 |
| - /** |
21 |
| - * get focus when component mounted |
22 |
| - * @default false |
23 |
| - * @type boolean |
24 |
| - */ |
25 |
| - autofocus: boolean; |
26 |
| - |
27 |
| - /** |
28 |
| - * backfill selected item the input when using keyboard |
29 |
| - * @default false |
30 |
| - * @type boolean |
31 |
| - */ |
32 |
| - backfill: boolean; |
33 |
| - |
34 |
| - /** |
35 |
| - * Data source for autocomplete |
36 |
| - * @type slot | Array<{ value: String, text: String }> |
37 |
| - */ |
38 |
| - dataSource: any; |
39 |
| - |
40 |
| - /** |
41 |
| - * Whether active first option by default |
42 |
| - * @default true |
43 |
| - * @type boolean |
44 |
| - */ |
45 |
| - defaultActiveFirstOption: boolean; |
46 |
| - |
47 |
| - /** |
48 |
| - * Initial selected option. |
49 |
| - * @type SelectValue |
50 |
| - */ |
51 |
| - defaultValue: SelectValue; |
52 |
| - |
53 |
| - /** |
54 |
| - * Whether disabled select |
55 |
| - * @default false |
56 |
| - * @type boolean |
57 |
| - */ |
58 |
| - disabled: boolean; |
59 |
| - |
60 |
| - /** |
61 |
| - * If true, filter options by input, if function, filter options against it. |
62 |
| - * The function will receive two arguments, inputValue and option, |
63 |
| - * if the function returns true, the option will be included in the filtered set; Otherwise, it will be excluded. |
64 |
| - * @default true |
65 |
| - * @type boolean | Function |
66 |
| - */ |
67 |
| - filterOption: boolean | Function; |
68 |
| - |
69 |
| - /** |
70 |
| - * Which prop value of option will render as content of select. |
71 |
| - * @default 'children' |
72 |
| - * @type string |
73 |
| - */ |
74 |
| - optionLabelProp: string; |
75 |
| - |
76 |
| - /** |
77 |
| - * placeholder of input |
78 |
| - * @type string |
79 |
| - */ |
80 |
| - placeholder: string; |
81 |
| - |
82 |
| - /** |
83 |
| - * selected option |
84 |
| - * @type SelectValue |
85 |
| - */ |
86 |
| - value: SelectValue; |
87 |
| - |
88 |
| - /** |
89 |
| - * Initial open state of dropdown |
90 |
| - * @type boolean |
91 |
| - */ |
92 |
| - defaultOpen: boolean; |
93 |
| - |
94 |
| - /** |
95 |
| - * Controlled open state of dropdown |
96 |
| - * @type boolean |
97 |
| - */ |
98 |
| - open: boolean; |
99 |
| - |
| 13 | + $props: { |
| 14 | + dropdownMenuStyle: CSSProperties; |
| 15 | + /** |
| 16 | + * Show clear button, effective in multiple mode only. |
| 17 | + * @default false |
| 18 | + * @type boolean |
| 19 | + */ |
| 20 | + allowClear: boolean; |
| 21 | + |
| 22 | + /** |
| 23 | + * get focus when component mounted |
| 24 | + * @default false |
| 25 | + * @type boolean |
| 26 | + */ |
| 27 | + autofocus: boolean; |
| 28 | + |
| 29 | + /** |
| 30 | + * backfill selected item the input when using keyboard |
| 31 | + * @default false |
| 32 | + * @type boolean |
| 33 | + */ |
| 34 | + backfill: boolean; |
| 35 | + |
| 36 | + /** |
| 37 | + * Data source for autocomplete |
| 38 | + * @type slot | Array<{ value: String, text: String }> |
| 39 | + */ |
| 40 | + dataSource: any; |
| 41 | + |
| 42 | + /** |
| 43 | + * Whether active first option by default |
| 44 | + * @default true |
| 45 | + * @type boolean |
| 46 | + */ |
| 47 | + defaultActiveFirstOption: boolean; |
| 48 | + |
| 49 | + /** |
| 50 | + * Initial selected option. |
| 51 | + * @type SelectValue |
| 52 | + */ |
| 53 | + defaultValue: SelectValue; |
| 54 | + |
| 55 | + /** |
| 56 | + * Whether disabled select |
| 57 | + * @default false |
| 58 | + * @type boolean |
| 59 | + */ |
| 60 | + disabled: boolean; |
| 61 | + |
| 62 | + /** |
| 63 | + * If true, filter options by input, if function, filter options against it. |
| 64 | + * The function will receive two arguments, inputValue and option, |
| 65 | + * if the function returns true, the option will be included in the filtered set; Otherwise, it will be excluded. |
| 66 | + * @default true |
| 67 | + * @type boolean | Function |
| 68 | + */ |
| 69 | + filterOption: boolean | Function; |
| 70 | + |
| 71 | + /** |
| 72 | + * Which prop value of option will render as content of select. |
| 73 | + * @default 'children' |
| 74 | + * @type string |
| 75 | + */ |
| 76 | + optionLabelProp: string; |
| 77 | + |
| 78 | + /** |
| 79 | + * placeholder of input |
| 80 | + * @type string |
| 81 | + */ |
| 82 | + placeholder: string; |
| 83 | + |
| 84 | + /** |
| 85 | + * selected option |
| 86 | + * @type SelectValue |
| 87 | + */ |
| 88 | + value: SelectValue; |
| 89 | + |
| 90 | + /** |
| 91 | + * Initial open state of dropdown |
| 92 | + * @type boolean |
| 93 | + */ |
| 94 | + defaultOpen: boolean; |
| 95 | + |
| 96 | + /** |
| 97 | + * Controlled open state of dropdown |
| 98 | + * @type boolean |
| 99 | + */ |
| 100 | + open: boolean; |
| 101 | + }; |
100 | 102 | /**
|
101 | 103 | * remove focus
|
102 | 104 | */
|
|
0 commit comments