Skip to content

Commit 0e78eed

Browse files
Pythonfotangjinzhou
authored andcommitted
fix: Button, DatePicker, Layout d.ts (#422)
* fix: Button, DatePicker, Layout d.ts * fix: sub component can be class cannot be instance
1 parent cf44441 commit 0e78eed

24 files changed

+122
-32
lines changed

types/anchor/anchor.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { AntdComponent } from '../component';
66
import { AnchorLink } from './anchor-link';
77

88
export declare class Anchor extends AntdComponent {
9-
static Link: AnchorLink;
9+
static Link: typeof AnchorLink;
1010

1111
/**
1212
* Fixed mode of Anchor

types/button/button.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { AntdComponent } from '../component';
66
import { ButtonGroup } from './button-group';
77

88
export declare class Button extends AntdComponent {
9-
Group: ButtonGroup;
9+
static Group: typeof ButtonGroup;
1010

1111
/**
1212
* can be set to primary ghost dashed danger(added in 2.7) or omitted (meaning default)

types/card.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Meta } from './meta';
77

88
export declare class Card extends AntdComponent {
99
static Grid: any;
10-
static Meta: Meta;
10+
static Meta: typeof Meta;
1111

1212
/**
1313
* The action list, shows at the bottom of the Card.

types/checkbox/checkbox.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { AntdComponent } from '../component';
66
import { CheckboxGroup } from './checkbox-group';
77

88
export declare class Checkbox extends AntdComponent {
9-
static Group: CheckboxGroup;
9+
static Group: typeof CheckboxGroup;
1010

1111
/**
1212
* get focus when component mounted

types/collapse/collapse.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { AntdComponent } from '../component';
66
import { CollapsePanel } from './collapse-panel';
77

88
export declare class Collapse extends AntdComponent {
9-
static Panel: CollapsePanel;
9+
static Panel: typeof CollapsePanel;
1010

1111
/**
1212
* If true, Collapse renders as Accordion

types/date-picker/date-picker.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import { MonthPicker } from './month-picker';
99
import { WeekPicker } from './week-picker';
1010

1111
export declare class DatePicker extends DatepickerCommon {
12-
RangePicker: RangePicker;
13-
MonthPicker: MonthPicker;
14-
WeekPickerker: WeekPicker;
12+
static RangePicker: typeof RangePicker;
13+
static MonthPicker: typeof MonthPicker;
14+
static WeekPickerker: typeof WeekPicker;
1515

1616
/**
1717
* Defualt Value

types/dropdown/dropdown.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Menu } from '../menu/menu';
77
import { DropdownButton } from './dropdown-button';
88

99
export declare class Dropdown extends AntdComponent {
10-
static Button: DropdownButton;
10+
static Button: typeof DropdownButton;
1111

1212
/**
1313
* the trigger mode which executes the drop-down action

types/form/form.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ export interface IformCreateOption {
319319
}
320320

321321
export declare class Form extends AntdComponent {
322-
static Item: FormItem;
322+
static Item: typeof FormItem;
323323
static create: (options: IformCreateOption) => (WrapedComponent: any) => any;
324324

325325
/**

types/input/input.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import { InputSearch } from './input-search';
88
import { TextArea } from './textarea';
99

1010
export declare class Input extends AntdComponent {
11-
static Group: InputGroup;
12-
static Search: InputSearch;
13-
static TextArea: TextArea;
11+
static Group: typeof InputGroup;
12+
static Search: typeof InputSearch;
13+
static TextArea: typeof TextArea;
1414

1515
/**
1616
* The label text displayed after (on the right side of) the input field.

types/layout/layout-content.d.ts

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Project: https://github.com/vueComponent/ant-design-vue
2+
// Definitions by: Pythonfo <https://github.com/Pythonfo>
3+
// Copy from: akki-jat <https://github.com/akki-jat>
4+
// Definitions: https://github.com/vueComponent/ant-design-vue/types
5+
6+
import { AntdComponent } from '../component';
7+
8+
export default class LayoutContent extends AntdComponent {
9+
10+
/**
11+
* container className
12+
* @default undefined
13+
* @type string
14+
*/
15+
class: string;
16+
17+
/**
18+
* to customize the styles
19+
* @type string | object
20+
*/
21+
style: string | object;
22+
23+
/**
24+
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
25+
* @type boolean
26+
*/
27+
hasSider: boolean;
28+
}

types/layout/layout-footer.d.ts

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Project: https://github.com/vueComponent/ant-design-vue
2+
// Definitions by: Pythonfo <https://github.com/Pythonfo>
3+
// Copy from: akki-jat <https://github.com/akki-jat>
4+
// Definitions: https://github.com/vueComponent/ant-design-vue/types
5+
6+
import { AntdComponent } from '../component';
7+
8+
export default class LayoutFooter extends AntdComponent {
9+
10+
/**
11+
* container className
12+
* @default undefined
13+
* @type string
14+
*/
15+
class: string;
16+
17+
/**
18+
* to customize the styles
19+
* @type string | object
20+
*/
21+
style: string | object;
22+
23+
/**
24+
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
25+
* @type boolean
26+
*/
27+
hasSider: boolean;
28+
}

types/layout/layout-header.d.ts

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Project: https://github.com/vueComponent/ant-design-vue
2+
// Definitions by: Pythonfo <https://github.com/Pythonfo>
3+
// Copy from: akki-jat <https://github.com/akki-jat>
4+
// Definitions: https://github.com/vueComponent/ant-design-vue/types
5+
6+
import { AntdComponent } from '../component';
7+
8+
export default class LayoutHeader extends AntdComponent {
9+
10+
/**
11+
* container className
12+
* @default undefined
13+
* @type string
14+
*/
15+
class: string;
16+
17+
/**
18+
* to customize the styles
19+
* @type string | object
20+
*/
21+
style: string | object;
22+
23+
/**
24+
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
25+
* @type boolean
26+
*/
27+
hasSider: boolean;
28+
}

types/layout/layout.d.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@
44

55
import { AntdComponent } from '../component';
66
import { LayoutSider } from './layout-sider';
7+
import LayoutHeader from './layout-header';
8+
import LayoutContent from './layout-content';
9+
import LayoutFooter from './layout-footer';
710

811
export declare class Layout extends AntdComponent {
9-
static Sider: LayoutSider;
12+
static Header: typeof LayoutHeader;
13+
static Content: typeof LayoutContent;
14+
static Footer: typeof LayoutFooter;
15+
static Sider: typeof LayoutSider;
1016

1117
/**
1218
* container className

types/list/list.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export declare class PaginationConfig extends Pagination {
1414
}
1515

1616
export class List extends AntdComponent {
17-
static Item: ListItem;
17+
static Item: typeof ListItem;
1818

1919
/**
2020
* Toggles rendering of the border around the list

types/menu/menu.d.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import { MenuItemGroup } from './menu-item-group';
99
import { Divider } from '../divider';
1010

1111
export declare class Menu extends AntdComponent {
12-
static Item: MenuItem;
13-
static SubMenu: SubMenu;
14-
static ItemGroup: MenuItemGroup;
15-
static Divider: Divider;
12+
static Item: typeof MenuItem;
13+
static SubMenu: typeof SubMenu;
14+
static ItemGroup: typeof MenuItemGroup;
15+
static Divider: typeof Divider;
1616

1717
/**
1818
* Allow selection of multiple items

types/radio/radio.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import { RadioGroup } from './radio-group';
77
import { RadioButton } from './radio-button';
88

99
export declare class Radio extends AntdComponent {
10-
static Group: RadioGroup;
11-
static Button: RadioButton;
10+
static Group: typeof RadioGroup;
11+
static Button: typeof RadioButton;
1212

1313
/**
1414
* get focus when component mounted

types/select/select.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { OptionGroup } from './option-group';
88
import { VNode } from 'vue';
99

1010
export declare class Select extends AntdComponent {
11-
static Option: Option;
12-
static OptGroup: OptionGroup;
11+
static Option: typeof Option;
12+
static OptGroup: typeof OptionGroup;
1313

1414
/**
1515
* Show clear button.

types/steps/steps.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { AntdComponent } from '../component';
66
import { Step } from './step';
77

88
export declare class Steps extends AntdComponent {
9-
static Step: Step;
9+
static Step: typeof Step;
1010

1111
/**
1212
* to set the current step, counting from 0. You can overwrite this state by using status of Step

types/table/table.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ export interface TableRowSelection {
116116
}
117117

118118
export declare class Table extends AntdComponent {
119-
static Column: Column;
120-
static ColumnGroup: ColumnGroup;
119+
static Column: typeof Column;
120+
static ColumnGroup: typeof ColumnGroup;
121121

122122
/**
123123
* Whether to show all table borders

types/tabs/tabs.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { AntdComponent } from '../component';
66
import { TabPane } from './tab-pane';
77

88
export declare class Tabs extends AntdComponent {
9-
static TabPane: TabPane;
9+
static TabPane: typeof TabPane;
1010

1111
/**
1212
* Current TabPane's key

types/tag/tag.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { AntdComponent } from '../component';
66
import { CheckableTag } from './checkable-tag';
77

88
export declare class Tag extends AntdComponent {
9-
static CheckableTag: CheckableTag;
9+
static CheckableTag: typeof CheckableTag;
1010

1111
/**
1212
* Callback executed when close animation is completed

types/timeline/timeline.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { AntdComponent } from '../component';
66
import { TimelineItem } from './timeline-item';
77

88
export declare class Timeline extends AntdComponent {
9-
static Item: TimelineItem;
9+
static Item: typeof TimelineItem;
1010

1111
/**
1212
* Set the last ghost node's existence or its content

types/tree-select.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface TreeData {
1616
}
1717

1818
export declare class TreeSelect extends AntdComponent {
19-
static TreeNode: TreeNode;
19+
static TreeNode: typeof TreeNode;
2020

2121
/**
2222
* Whether allow clear

types/tree/tree.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import { TreeNode } from '../tree-node';
77
import { DictionaryTree } from './dictionary-tree';
88

99
export declare class Tree extends AntdComponent {
10-
static TreeNode: TreeNode;
11-
static DirectoryTree: DictionaryTree;
10+
static TreeNode: typeof TreeNode;
11+
static DirectoryTree: typeof DictionaryTree;
1212

1313
/**
1414
* treeNode of tree

0 commit comments

Comments
 (0)