|
3 | 3 | // Definitions: https://github.com/vueComponent/ant-design-vue/types
|
4 | 4 |
|
5 | 5 | import { AntdComponent } from './component';
|
6 |
| - |
| 6 | +import { VNodeChild } from 'vue'; |
7 | 7 | export declare class Switch extends AntdComponent {
|
8 |
| - /** |
| 8 | + $props: { |
| 9 | + /** |
9 | 10 | * get focus when component mounted
|
10 | 11 | * @default false
|
11 | 12 | * @type boolean
|
12 | 13 | */
|
13 |
| - autofocus: boolean; |
| 14 | + autofocus?: boolean; |
14 | 15 |
|
15 |
| - /** |
16 |
| - * determine whether the Switch is checked |
17 |
| - * @default false |
18 |
| - * @type boolean |
19 |
| - */ |
20 |
| - checked: boolean; |
| 16 | + /** |
| 17 | + * determine whether the Switch is checked |
| 18 | + * @default false |
| 19 | + * @type boolean |
| 20 | + */ |
| 21 | + checked?: boolean; |
21 | 22 |
|
22 |
| - /** |
23 |
| - * content to be shown when the state is checked |
24 |
| - * @type any (string | slot) |
25 |
| - */ |
26 |
| - checkedChildren: any; |
| 23 | + /** |
| 24 | + * content to be shown when the state is checked |
| 25 | + * @type any (string | slot) |
| 26 | + */ |
| 27 | + checkedChildren?: VNodeChild | JSX.Element; |
27 | 28 |
|
28 |
| - /** |
29 |
| - * to set the initial state |
30 |
| - * @default false |
31 |
| - * @type boolean |
32 |
| - */ |
33 |
| - defaultChecked: boolean; |
| 29 | + /** |
| 30 | + * to set the initial state |
| 31 | + * @default false |
| 32 | + * @type boolean |
| 33 | + */ |
| 34 | + defaultChecked?: boolean; |
34 | 35 |
|
35 |
| - /** |
36 |
| - * Disable switch |
37 |
| - * @default false |
38 |
| - * @type boolean |
39 |
| - */ |
40 |
| - disabled: boolean; |
| 36 | + /** |
| 37 | + * Disable switch |
| 38 | + * @default false |
| 39 | + * @type boolean |
| 40 | + */ |
| 41 | + disabled?: boolean; |
41 | 42 |
|
42 |
| - /** |
43 |
| - * loading state of switch |
44 |
| - * @default false |
45 |
| - * @type boolean |
46 |
| - */ |
47 |
| - loading: boolean; |
| 43 | + /** |
| 44 | + * loading state of switch |
| 45 | + * @default false |
| 46 | + * @type boolean |
| 47 | + */ |
| 48 | + loading?: boolean; |
48 | 49 |
|
49 |
| - /** |
50 |
| - * the size of the Switch, options: default small |
51 |
| - * @default 'default' |
52 |
| - * @type string |
53 |
| - */ |
54 |
| - size: 'small' | 'default' | 'large'; |
| 50 | + /** |
| 51 | + * the size of the Switch, options: default small |
| 52 | + * @default 'default' |
| 53 | + * @type string |
| 54 | + */ |
| 55 | + size?: 'small' | 'default' | 'large'; |
55 | 56 |
|
56 |
| - /** |
57 |
| - * content to be shown when the state is unchecked |
58 |
| - * @type any (string | slot) |
59 |
| - */ |
60 |
| - unCheckedChildren: any; |
| 57 | + /** |
| 58 | + * content to be shown when the state is unchecked |
| 59 | + * @type any (string | slot) |
| 60 | + */ |
| 61 | + unCheckedChildren?: VNodeChild | JSX.Element; |
61 | 62 |
|
| 63 | + } |
62 | 64 | /**
|
63 | 65 | * remove focus
|
64 | 66 | */
|
|
0 commit comments