Skip to content

Commit 01c0a03

Browse files
author
undefined
committed
chore: update types
1 parent 4636463 commit 01c0a03

24 files changed

+550
-647
lines changed

types/ant-design-vue.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { Input } from './input/input';
3232
import { InputNumber } from './input-number';
3333
import { Layout } from './layout/layout';
3434
import { List } from './list/list';
35-
import { LocaleProvider } from './locale-provider';
35+
import { Space } from './space';
3636
import { Message } from './message';
3737
import { Mentions } from './mentions/mentions';
3838
import { Menu } from './menu/menu';
@@ -104,7 +104,7 @@ export {
104104
InputNumber,
105105
Layout,
106106
List,
107-
LocaleProvider,
107+
Space,
108108
message,
109109
Menu,
110110
Mentions,

types/auto-complete.d.ts

Lines changed: 90 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -3,100 +3,102 @@
33
// Definitions: https://github.com/vueComponent/ant-design-vue/types
44

55
import { AntdComponent } from './component';
6+
import { CSSProperties } from 'vue';
67

78
export declare type Value = { key: string };
89

910
export declare type SelectValue = string | number | Value | Array<Value | string | number>;
1011

1112
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+
};
100102
/**
101103
* remove focus
102104
*/

types/card.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export declare class Card extends AntdComponent {
8181
* List of TabPane's head, Custom tabs can be created with the scopedSlots property
8282
* @type Array<{key: string, tab: any, scopedSlots: {tab: string}}>
8383
*/
84-
tabList?: Array<{ key: string; tab: any; scopedSlots: { tab: string } }>;
84+
tabList?: Array<{ key: string; tab: any; slots: { tab: string } }>;
8585

8686
/**
8787
* Card title

types/collapse/collapse-panel.d.ts

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,40 @@
55
import { AntdComponent } from '../component';
66

77
export declare class CollapsePanel extends AntdComponent {
8-
/**
9-
* If true, panel cannot be opened or closed
10-
* @default false
11-
* @type boolean
12-
*/
13-
disabled: boolean;
8+
$props: {
9+
/**
10+
* If true, panel cannot be opened or closed
11+
* @default false
12+
* @type boolean
13+
*/
14+
disabled?: boolean;
1415

15-
/**
16-
* Forced render of content on panel, instead of lazy rending after clicking on header
17-
* @default false
18-
* @type boolean
19-
*/
20-
forceRender: boolean;
16+
/**
17+
* Forced render of content on panel, instead of lazy rending after clicking on header
18+
* @default false
19+
* @type boolean
20+
*/
21+
forceRender?: boolean;
2122

22-
/**
23-
* Title of the panel
24-
* @type string
25-
*/
26-
header: string;
23+
/**
24+
* Title of the panel
25+
* @type string
26+
*/
27+
header?: string;
2728

28-
/**
29-
* Unique key identifying the panel from among its siblings
30-
* @type string
31-
*/
32-
key: string;
29+
/**
30+
* Unique key identifying the panel from among its siblings
31+
* @type string
32+
*/
33+
key?: string;
3334

34-
/**
35-
* If false, panel will not show arrow icon
36-
* @default true
37-
* @type boolean
38-
*/
39-
showArrow: boolean;
35+
/**
36+
* If false, panel will not show arrow icon
37+
* @default true
38+
* @type boolean
39+
*/
40+
showArrow?: boolean;
4041

41-
extra: any;
42+
extra?: any;
43+
};
4244
}

types/collapse/collapse.d.ts

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,45 +7,46 @@ import { CollapsePanel } from './collapse-panel';
77
export type ExpandIconPosition = 'left' | 'right';
88
export declare class Collapse extends AntdComponent {
99
static Panel: typeof CollapsePanel;
10+
$props: {
11+
expandIconPosition?: ExpandIconPosition;
12+
/**
13+
* If true, Collapse renders as Accordion
14+
* @default false
15+
* @type boolean
16+
*/
17+
accordion?: boolean;
1018

11-
expandIconPosition?: ExpandIconPosition;
12-
/**
13-
* If true, Collapse renders as Accordion
14-
* @default false
15-
* @type boolean
16-
*/
17-
accordion: boolean;
19+
/**
20+
* Key of the active panel
21+
* @default No default value. In accordion mode, it's the key of the first panel.
22+
* @type string | string[]
23+
*/
24+
activeKey?: string | string[];
1825

19-
/**
20-
* Key of the active panel
21-
* @default No default value. In accordion mode, it's the key of the first panel.
22-
* @type string | string[]
23-
*/
24-
activeKey: string | string[];
26+
/**
27+
* Toggles rendering of the border around the collapse block
28+
* @default true
29+
* @type boolean
30+
*/
31+
bordered?: boolean;
2532

26-
/**
27-
* Toggles rendering of the border around the collapse block
28-
* @default true
29-
* @type boolean
30-
*/
31-
bordered: boolean;
33+
/**
34+
* Key of the initial active panel
35+
* @type string
36+
*/
37+
defaultActiveKey?: string | string[];
3238

33-
/**
34-
* Key of the initial active panel
35-
* @type string
36-
*/
37-
defaultActiveKey: string | string[];
39+
/**
40+
* Destroy Inactive Panel
41+
* @default false
42+
* @type boolean
43+
*/
44+
destroyInactivePanel?: boolean;
3845

39-
/**
40-
* Destroy Inactive Panel
41-
* @default false
42-
* @type boolean
43-
*/
44-
destroyInactivePanel: boolean;
45-
46-
/**
47-
* allow to customize collapse icon.
48-
* @type any (function | slot-scope)
49-
*/
50-
expandIcon: any;
46+
/**
47+
* allow to customize collapse icon.
48+
* @type any (function | slot-scope)
49+
*/
50+
expandIcon?: any;
51+
};
5152
}

0 commit comments

Comments
 (0)