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

File tree

24 files changed

+122
-32
lines changed

24 files changed

+122
-32
lines changed

types/anchor/anchor.d.ts

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 28 additions & 0 deletions
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+
}

0 commit comments

Comments
 (0)