|
4 | 4 |
|
5 | 5 | import { AntdComponent } from '../component';
|
6 | 6 | import { TabPane } from './tab-pane';
|
| 7 | +import { CSSProperties, VNodeChild } from 'vue'; |
7 | 8 |
|
8 | 9 | export declare class Tabs extends AntdComponent {
|
9 | 10 | static TabPane: typeof TabPane;
|
| 11 | + $props: { |
| 12 | + /** |
| 13 | + * Current TabPane's key |
| 14 | + * @type string |
| 15 | + */ |
| 16 | + activeKey?: string; |
10 | 17 |
|
11 |
| - /** |
12 |
| - * Current TabPane's key |
13 |
| - * @type string |
14 |
| - */ |
15 |
| - activeKey: string; |
| 18 | + /** |
| 19 | + * Whether to change tabs with animation. Only works while tabPosition="top"\|"bottom" |
| 20 | + * @default true, false when type="card" |
| 21 | + * @type boolean | object |
| 22 | + */ |
| 23 | + animated?: boolean | { inkBar: boolean; tabPane: boolean }; |
16 | 24 |
|
17 |
| - /** |
18 |
| - * Whether to change tabs with animation. Only works while tabPosition="top"\|"bottom" |
19 |
| - * @default true, false when type="card" |
20 |
| - * @type boolean | object |
21 |
| - */ |
22 |
| - animated: boolean | { inkBar: boolean; tabPane: boolean }; |
| 25 | + /** |
| 26 | + * Initial active TabPane's key, if activeKey is not set. |
| 27 | + * @type string |
| 28 | + */ |
| 29 | + defaultActiveKey?: string; |
23 | 30 |
|
24 |
| - /** |
25 |
| - * Initial active TabPane's key, if activeKey is not set. |
26 |
| - * @type string |
27 |
| - */ |
28 |
| - defaultActiveKey: string; |
| 31 | + /** |
| 32 | + * Hide plus icon or not. Only works while type="editable-card" |
| 33 | + * @default false |
| 34 | + * @type boolean |
| 35 | + */ |
| 36 | + hideAdd?: boolean; |
29 | 37 |
|
30 |
| - /** |
31 |
| - * Hide plus icon or not. Only works while type="editable-card" |
32 |
| - * @default false |
33 |
| - * @type boolean |
34 |
| - */ |
35 |
| - hideAdd: boolean; |
| 38 | + /** |
| 39 | + * preset tab bar size |
| 40 | + * @default 'default' |
| 41 | + * @type string |
| 42 | + */ |
| 43 | + size?: 'default' | 'small' | 'large'; |
36 | 44 |
|
37 |
| - /** |
38 |
| - * preset tab bar size |
39 |
| - * @default 'default' |
40 |
| - * @type string |
41 |
| - */ |
42 |
| - size: 'default' | 'small' | 'large'; |
| 45 | + /** |
| 46 | + * Extra content in tab bar |
| 47 | + * @type any |
| 48 | + */ |
| 49 | + tabBarExtraContent?: VNodeChild | JSX.Element; |
43 | 50 |
|
44 |
| - /** |
45 |
| - * Extra content in tab bar |
46 |
| - * @type any |
47 |
| - */ |
48 |
| - tabBarExtraContent: any; |
| 51 | + /** |
| 52 | + * Tab bar style object |
| 53 | + * @type object |
| 54 | + */ |
| 55 | + tabBarStyle?: CSSProperties; |
49 | 56 |
|
50 |
| - /** |
51 |
| - * Tab bar style object |
52 |
| - * @type object |
53 |
| - */ |
54 |
| - tabBarStyle: object; |
| 57 | + /** |
| 58 | + * Position of tabs |
| 59 | + * @default 'top' |
| 60 | + * @type string |
| 61 | + */ |
| 62 | + tabPosition?: 'top' | 'right' | 'bottom' | 'left'; |
55 | 63 |
|
56 |
| - /** |
57 |
| - * Position of tabs |
58 |
| - * @default 'top' |
59 |
| - * @type string |
60 |
| - */ |
61 |
| - tabPosition: 'top' | 'right' | 'bottom' | 'left'; |
| 64 | + /** |
| 65 | + * Basic style of tabs |
| 66 | + * @default 'line' |
| 67 | + * @type string |
| 68 | + */ |
| 69 | + type?: 'line' | 'card' | 'editable-card'; |
62 | 70 |
|
63 |
| - /** |
64 |
| - * Basic style of tabs |
65 |
| - * @default 'line' |
66 |
| - * @type string |
67 |
| - */ |
68 |
| - type: 'line' | 'card' | 'editable-card'; |
69 |
| - |
70 |
| - /** |
71 |
| - * The gap between tabs |
72 |
| - * @type number |
73 |
| - */ |
74 |
| - tabBarGutter: number; |
| 71 | + /** |
| 72 | + * The gap between tabs |
| 73 | + * @type number |
| 74 | + */ |
| 75 | + tabBarGutter?: number; |
| 76 | + } |
75 | 77 | }
|
0 commit comments