fix: Button, DatePicker, Layout d.ts (#422)

* fix: Button, DatePicker, Layout d.ts

* fix: sub component can be class cannot be instance
pull/425/head
Pythonfo 2019-01-19 18:56:33 +08:00 committed by tangjinzhou
parent cf444416cf
commit 0e78eedbfb
24 changed files with 122 additions and 32 deletions

View File

@ -6,7 +6,7 @@ import { AntdComponent } from '../component';
import { AnchorLink } from './anchor-link';
export declare class Anchor extends AntdComponent {
static Link: AnchorLink;
static Link: typeof AnchorLink;
/**
* Fixed mode of Anchor

View File

@ -6,7 +6,7 @@ import { AntdComponent } from '../component';
import { ButtonGroup } from './button-group';
export declare class Button extends AntdComponent {
Group: ButtonGroup;
static Group: typeof ButtonGroup;
/**
* can be set to primary ghost dashed danger(added in 2.7) or omitted (meaning default)

2
types/card.d.ts vendored
View File

@ -7,7 +7,7 @@ import { Meta } from './meta';
export declare class Card extends AntdComponent {
static Grid: any;
static Meta: Meta;
static Meta: typeof Meta;
/**
* The action list, shows at the bottom of the Card.

View File

@ -6,7 +6,7 @@ import { AntdComponent } from '../component';
import { CheckboxGroup } from './checkbox-group';
export declare class Checkbox extends AntdComponent {
static Group: CheckboxGroup;
static Group: typeof CheckboxGroup;
/**
* get focus when component mounted

View File

@ -6,7 +6,7 @@ import { AntdComponent } from '../component';
import { CollapsePanel } from './collapse-panel';
export declare class Collapse extends AntdComponent {
static Panel: CollapsePanel;
static Panel: typeof CollapsePanel;
/**
* If true, Collapse renders as Accordion

View File

@ -9,9 +9,9 @@ import { MonthPicker } from './month-picker';
import { WeekPicker } from './week-picker';
export declare class DatePicker extends DatepickerCommon {
RangePicker: RangePicker;
MonthPicker: MonthPicker;
WeekPickerker: WeekPicker;
static RangePicker: typeof RangePicker;
static MonthPicker: typeof MonthPicker;
static WeekPickerker: typeof WeekPicker;
/**
* Defualt Value

View File

@ -7,7 +7,7 @@ import { Menu } from '../menu/menu';
import { DropdownButton } from './dropdown-button';
export declare class Dropdown extends AntdComponent {
static Button: DropdownButton;
static Button: typeof DropdownButton;
/**
* the trigger mode which executes the drop-down action

View File

@ -319,7 +319,7 @@ export interface IformCreateOption {
}
export declare class Form extends AntdComponent {
static Item: FormItem;
static Item: typeof FormItem;
static create: (options: IformCreateOption) => (WrapedComponent: any) => any;
/**

View File

@ -8,9 +8,9 @@ import { InputSearch } from './input-search';
import { TextArea } from './textarea';
export declare class Input extends AntdComponent {
static Group: InputGroup;
static Search: InputSearch;
static TextArea: TextArea;
static Group: typeof InputGroup;
static Search: typeof InputSearch;
static TextArea: typeof TextArea;
/**
* The label text displayed after (on the right side of) the input field.

28
types/layout/layout-content.d.ts vendored Normal file
View File

@ -0,0 +1,28 @@
// Project: https://github.com/vueComponent/ant-design-vue
// Definitions by: Pythonfo <https://github.com/Pythonfo>
// Copy from: akki-jat <https://github.com/akki-jat>
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from '../component';
export default class LayoutContent extends AntdComponent {
/**
* container className
* @default undefined
* @type string
*/
class: string;
/**
* to customize the styles
* @type string | object
*/
style: string | object;
/**
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
* @type boolean
*/
hasSider: boolean;
}

28
types/layout/layout-footer.d.ts vendored Normal file
View File

@ -0,0 +1,28 @@
// Project: https://github.com/vueComponent/ant-design-vue
// Definitions by: Pythonfo <https://github.com/Pythonfo>
// Copy from: akki-jat <https://github.com/akki-jat>
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from '../component';
export default class LayoutFooter extends AntdComponent {
/**
* container className
* @default undefined
* @type string
*/
class: string;
/**
* to customize the styles
* @type string | object
*/
style: string | object;
/**
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
* @type boolean
*/
hasSider: boolean;
}

28
types/layout/layout-header.d.ts vendored Normal file
View File

@ -0,0 +1,28 @@
// Project: https://github.com/vueComponent/ant-design-vue
// Definitions by: Pythonfo <https://github.com/Pythonfo>
// Copy from: akki-jat <https://github.com/akki-jat>
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from '../component';
export default class LayoutHeader extends AntdComponent {
/**
* container className
* @default undefined
* @type string
*/
class: string;
/**
* to customize the styles
* @type string | object
*/
style: string | object;
/**
* whether contain Sider in children, don't have to assign it normally. Useful in ssr avoid style flickering
* @type boolean
*/
hasSider: boolean;
}

View File

@ -4,9 +4,15 @@
import { AntdComponent } from '../component';
import { LayoutSider } from './layout-sider';
import LayoutHeader from './layout-header';
import LayoutContent from './layout-content';
import LayoutFooter from './layout-footer';
export declare class Layout extends AntdComponent {
static Sider: LayoutSider;
static Header: typeof LayoutHeader;
static Content: typeof LayoutContent;
static Footer: typeof LayoutFooter;
static Sider: typeof LayoutSider;
/**
* container className

View File

@ -14,7 +14,7 @@ export declare class PaginationConfig extends Pagination {
}
export class List extends AntdComponent {
static Item: ListItem;
static Item: typeof ListItem;
/**
* Toggles rendering of the border around the list

View File

@ -9,10 +9,10 @@ import { MenuItemGroup } from './menu-item-group';
import { Divider } from '../divider';
export declare class Menu extends AntdComponent {
static Item: MenuItem;
static SubMenu: SubMenu;
static ItemGroup: MenuItemGroup;
static Divider: Divider;
static Item: typeof MenuItem;
static SubMenu: typeof SubMenu;
static ItemGroup: typeof MenuItemGroup;
static Divider: typeof Divider;
/**
* Allow selection of multiple items

View File

@ -7,8 +7,8 @@ import { RadioGroup } from './radio-group';
import { RadioButton } from './radio-button';
export declare class Radio extends AntdComponent {
static Group: RadioGroup;
static Button: RadioButton;
static Group: typeof RadioGroup;
static Button: typeof RadioButton;
/**
* get focus when component mounted

View File

@ -8,8 +8,8 @@ import { OptionGroup } from './option-group';
import { VNode } from 'vue';
export declare class Select extends AntdComponent {
static Option: Option;
static OptGroup: OptionGroup;
static Option: typeof Option;
static OptGroup: typeof OptionGroup;
/**
* Show clear button.

View File

@ -6,7 +6,7 @@ import { AntdComponent } from '../component';
import { Step } from './step';
export declare class Steps extends AntdComponent {
static Step: Step;
static Step: typeof Step;
/**
* to set the current step, counting from 0. You can overwrite this state by using status of Step

View File

@ -116,8 +116,8 @@ export interface TableRowSelection {
}
export declare class Table extends AntdComponent {
static Column: Column;
static ColumnGroup: ColumnGroup;
static Column: typeof Column;
static ColumnGroup: typeof ColumnGroup;
/**
* Whether to show all table borders

View File

@ -6,7 +6,7 @@ import { AntdComponent } from '../component';
import { TabPane } from './tab-pane';
export declare class Tabs extends AntdComponent {
static TabPane: TabPane;
static TabPane: typeof TabPane;
/**
* Current TabPane's key

2
types/tag/tag.d.ts vendored
View File

@ -6,7 +6,7 @@ import { AntdComponent } from '../component';
import { CheckableTag } from './checkable-tag';
export declare class Tag extends AntdComponent {
static CheckableTag: CheckableTag;
static CheckableTag: typeof CheckableTag;
/**
* Callback executed when close animation is completed

View File

@ -6,7 +6,7 @@ import { AntdComponent } from '../component';
import { TimelineItem } from './timeline-item';
export declare class Timeline extends AntdComponent {
static Item: TimelineItem;
static Item: typeof TimelineItem;
/**
* Set the last ghost node's existence or its content

View File

@ -16,7 +16,7 @@ export interface TreeData {
}
export declare class TreeSelect extends AntdComponent {
static TreeNode: TreeNode;
static TreeNode: typeof TreeNode;
/**
* Whether allow clear

View File

@ -7,8 +7,8 @@ import { TreeNode } from '../tree-node';
import { DictionaryTree } from './dictionary-tree';
export declare class Tree extends AntdComponent {
static TreeNode: TreeNode;
static DirectoryTree: DictionaryTree;
static TreeNode: typeof TreeNode;
static DirectoryTree: typeof DictionaryTree;
/**
* treeNode of tree