chror : Fix types popconfirm , page-header ... (#2692)

* chore: update type popconfirm

* chore: update type page-header

* chore: update type popover

* chore: update type progress

* chore: update type radio

* chore: update type rate

* chore: update type row

* fix: remove string type

* chore: update type Select

* fix:add $props

* chore: update type spin

* chore: update type statistic

* chore: update type step

* fix : add $props

* fix:popconfirm add  $props

* fix: page-header types

* fix: add onChange

* fix : select type

* fix: add  type

* fix: defined PaginationRenderProps
This commit is contained in:
binhaoCen 2020-08-18 10:12:57 +08:00 committed by GitHub
parent 79bb979daa
commit c75582b4b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 872 additions and 798 deletions

54
types/grid/row.d.ts vendored
View File

@ -7,38 +7,40 @@ import { AntdComponent } from '../component';
type Gutter =
| number
| {
xs: number;
sm: number;
md: number;
lg: number;
xl: number;
xxl: number;
};
xs: number;
sm: number;
md: number;
lg: number;
xl: number;
xxl: number;
};
export declare class Row extends AntdComponent {
/**
$props: {
/**
* spacing between grids, could be a number or a object like { xs: 8, sm: 16, md: 24}
* @default 0
* @type numner | object
*/
gutter: Gutter | [Gutter, Gutter];
gutter?: Gutter | [Gutter, Gutter];
/**
* layout mode, optional flex
* @type string
*/
type: string;
/**
* layout mode, optional flex
* @type string
*/
type?: string;
/**
* the vertical alignment of the flex layout: top middle bottom
* @default 'top'
* @type string
*/
align: 'top' | 'middle' | 'bottom';
/**
* the vertical alignment of the flex layout: top middle bottom
* @default 'top'
* @type string
*/
align?: 'top' | 'middle' | 'bottom';
/**
* horizontal arrangement of the flex layout: start end center space-around space-between
* @default 'start'
* @type string
*/
justify: 'start' | 'end' | 'center' | 'space-around' | 'space-between';
/**
* horizontal arrangement of the flex layout: start end center space-around space-between
* @default 'start'
* @type string
*/
justify?: 'start' | 'end' | 'center' | 'space-around' | 'space-between';
}
}

104
types/page-header.d.ts vendored
View File

@ -3,59 +3,73 @@
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from './component';
import { VNodeChild } from 'vue';
export declare class PageHeader extends AntdComponent {
/**
* Custom backIcon
* @default <ArrowLeftOutlined />
* @type any (string | slot)
*/
backIcon: any;
$props: {
/**
* Custom backIcon
* @default <ArrowLeftOutlined />
* @type any (string | slot)
*/
backIcon?: VNodeChild | JSX.Element;
/**
* Custom prefixCls
* @type string
*/
prefixCls: string;
/**
* Custom prefixCls
* @type string
*/
prefixCls?: string;
/**
* Custom title
* @type any (string | slot)
*/
title: any;
/**
* Custom title
* @type any (string | slot)
*/
title?: VNodeChild | JSX.Element;
/**
* Custom subTitle
* @type any (string | slot)
*/
subTitle: any;
/**
* Custom subTitle
* @type any (string | slot)
*/
subTitle?: VNodeChild | JSX.Element;
/**
* Breadcrumb configuration
* @type breadcrumb
*/
breadcrumb?: object;
breadcrumb: object;
/**
* Tag list next to title
* @type any (string | slot)
*/
tags?: VNodeChild | JSX.Element;
/**
* Custom tags
* @type any (string | slot)
*/
tags: any;
/**
* PageHeader's footer, generally used to render TabBar
* @type any (string | slot)
*/
footer?: VNodeChild | JSX.Element;
/**
* Custom footer
* @type any (string | slot)
*/
footer: any;
/**
* Operating area, at the end of the line of the title line
* @type any (string | slot)
*/
extra?: VNodeChild | JSX.Element;
/**
* Avatar next to the title bar
* @type Avatar
*/
avatar?: object;
/**
* PageHeader type, will change background color
* @default true
* @type boolean
*/
ghost?: boolean;
/**
* Custom extra
* @type any (string | slot)
*/
extra: any;
/**
* Specify a callback that will be called when a user clicks backIcon.
*/
onBack(): () => void;
}
avatar: object;
ghost: boolean;
/**
* Specify a callback that will be called when a user clicks backIcon.
*/
back(): void;
}

182
types/pagination.d.ts vendored
View File

@ -3,92 +3,98 @@
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from './component';
import { VNode } from 'vue';
export declare class Pagination extends AntdComponent {
/**
* total number of data items
* @default 0
* @type number
*/
total?: number;
/**
* default initial page number
* @default 1
* @type number
*/
defaultCurrent?: number;
/**
* current page number
* @type number
*/
current?: number;
/**
* default number of data items per page
* @default 10
* @type number
*/
defaultPageSize?: number;
/**
* number of data items per page
* @type number
*/
pageSize?: number;
/**
* Whether to hide pager on single page
* @default false
* @type boolean
*/
hideOnSinglePage?: boolean;
/**
* determine whether pageSize can be changed
* @default false
* @type boolean
*/
showSizeChanger?: boolean;
/**
* specify the sizeChanger options
* @default ['10', '20', '30', '40']
* @type string[]
*/
pageSizeOptions?: string[];
/**
* determine whether you can jump to pages directly
* @default false
* @type boolean
*/
showQuickJumper?: boolean | object;
/**
* to display the total number and range
* @type Function
*/
showTotal?: (total: number, range: [number, number]) => any;
/**
* specify the size of Pagination, can be set to small
* @default ''
* @type string
*/
size?: string;
/**
* whether to use simple mode
* @type boolean
*/
simple?: boolean;
/**
* to customize item innerHTML
* @type Function
*/
itemRender?: (page: number, type: 'page' | 'prev' | 'next', originalElement: any) => VNode;
import { VNodeChild } from 'vue';
interface PaginationRenderProps {
page: number
type: 'page' | 'prev' | 'next'
originalElement: any
}
export declare class Pagination extends AntdComponent {
$props: {
/**
* total number of data items
* @default 0
* @type number
*/
total?: number;
/**
* default initial page number
* @default 1
* @type number
*/
defaultCurrent?: number;
/**
* current page number
* @type number
*/
current?: number;
/**
* default number of data items per page
* @default 10
* @type number
*/
defaultPageSize?: number;
/**
* number of data items per page
* @type number
*/
pageSize?: number;
/**
* Whether to hide pager on single page
* @default false
* @type boolean
*/
hideOnSinglePage?: boolean;
/**
* determine whether pageSize can be changed
* @default false
* @type boolean
*/
showSizeChanger?: boolean;
/**
* specify the sizeChanger options
* @default ['10', '20', '30', '40']
* @type string[]
*/
pageSizeOptions?: string[];
/**
* determine whether you can jump to pages directly
* @default false
* @type boolean
*/
showQuickJumper?: boolean | object;
/**
* to display the total number and range
* @type Function
*/
showTotal?: (total: number, range: [number, number]) => any;
/**
* specify the size of Pagination, can be set to small
* @default ''
* @type string
*/
size?: string;
/**
* whether to use simple mode
* @type boolean
*/
simple?: boolean;
/**
* to customize item innerHTML
* @type Function
*/
itemRender?: (props:PaginationRenderProps) => VNodeChild | JSX.Element;
}
}

69
types/popconfirm.d.ts vendored
View File

@ -3,41 +3,48 @@
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { TooltipCommon } from './tootip/common';
import { VNodeChild } from 'vue';
export declare class Popconfirm extends TooltipCommon {
/**
* text of the Cancel button
* @default 'Cancel'
* @type any (string | slot)
*/
cancelText: any;
$props: {
/**
* text of the Cancel button
* @default 'Cancel'
* @type any (string | slot)
*/
cancelText?: VNodeChild | JSX.Element;
/**
* text of the Confirm button
* @default 'Confirm'
* @type any (string | slot)
*/
okText: any;
/**
* text of the Confirm button
* @default 'Confirm'
* @type any (string | slot)
*/
okText?: VNodeChild | JSX.Element;
/**
* Button type of the Confirm button
* @default 'primary'
* @type string
*/
okType: 'primary' | 'danger' | 'dashed' | 'ghost' | 'default';
/**
* Button type of the Confirm button
* @default 'primary'
* @type string
*/
okType?: 'primary' | 'danger' | 'dashed' | 'ghost' | 'default';
/**
* title of the confirmation box
* @type any (string | slot)
*/
title: any;
/**
* title of the confirmation box
* @type any (string | slot)
*/
title?: VNodeChild | JSX.Element;
/**
* customize icon of confirmation
* @default <ExclamationCircleOutlined />
* @type any (VNode | slot)
*/
icon: any;
/**
* customize icon of confirmation
* @default <ExclamationCircleOutlined />
* @type any (VNode | slot)
*/
icon?: VNodeChild | JSX.Element;
/**
* is show popconfirm when click its childrenNode
* @default false
* @type boolean
*/
disabled?: boolean;
}
disabled: boolean;
}

24
types/popover.d.ts vendored
View File

@ -3,17 +3,19 @@
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { TooltipCommon } from './tootip/common';
import { VNodeChild } from 'vue';
export declare class Popover extends TooltipCommon {
/**
* Content of the card
* @type any (string | slot | VNode)
*/
content: any;
$props: {
/**
* Content of the card
* @type any (string | slot | VNode)
*/
content?: VNodeChild | JSX.Element;
/**
* Title of the card
* @type any (string | slot | VNode)
*/
title: any;
/**
* Title of the card
* @type any (string | slot | VNode)
*/
title?: VNodeChild | JSX.Element;
}
}

146
types/progress.d.ts vendored
View File

@ -8,87 +8,89 @@ export type StringGradients = { [percentage: string]: string };
type FromToGradients = { from: string; to: string };
export type ProgressGradient = { direction?: string } & (StringGradients | FromToGradients);
export declare class Progress extends AntdComponent {
/**
* template function of the content
* @default percent => percent + '%'
* @type Function
*/
format: (percent?: number, successPercent?: number) => any;
$props: {
/**
* template function of the content
* @default percent => percent + '%'
* @type Function
*/
format?: (percent?: number, successPercent?: number) => any;
/**
* the gap degree of half circle, 0 ~ 360
* @default 0
* @type number
*/
gapDegree: number;
/**
* the gap degree of half circle, 0 ~ 360
* @default 0
* @type number
*/
gapDegree?: number;
/**
* the gap position, options: top bottom left right
* @default 'top'
* @type string
*/
gapPosition: 'top' | 'bottom' | 'left' | 'right';
/**
* the gap position, options: top bottom left right
* @default 'top'
* @type string
*/
gapPosition?: 'top' | 'bottom' | 'left' | 'right';
/**
* to set the completion percentage
* @default 0
* @type number
*/
percent: number;
/**
* to set the completion percentage
* @default 0
* @type number
*/
percent?: number;
/**
* whether to display the progress value and the status icon
* @default true
* @type boolean
*/
showInfo: boolean;
/**
* whether to display the progress value and the status icon
* @default true
* @type boolean
*/
showInfo?: boolean;
/**
* to set the status of the Progress, options: normal success exception active
* @default 'normal'
* @type string
*/
status: 'normal' | 'success' | 'active' | 'exception';
/**
* to set the status of the Progress, options: normal success exception active
* @default 'normal'
* @type string
*/
status?: 'normal' | 'success' | 'active' | 'exception';
/**
* to set the width of the progress bar, unit: px.
* to set the width of the circular progress bar, unit: percentage of the canvas width
* @default 10 if type = 'line', else 6
* @type number
*/
strokeWidth: number;
/**
* to set the width of the progress bar, unit: px.
* to set the width of the circular progress bar, unit: percentage of the canvas width
* @default 10 if type = 'line', else 6
* @type number
*/
strokeWidth?: number;
/**
* to set the style of the progress linecap
* @default 'round'
* @type Enum{ 'round', 'square' }
*/
strokeLinecap: 'butt' | 'square' | 'round';
/**
* to set the style of the progress linecap
* @default 'round'
* @type Enum{ 'round', 'square' }
*/
strokeLinecap?: 'butt' | 'square' | 'round';
/**
* color of progress bar
* @type string
*/
strokeColor: string | ProgressGradient;
/**
* color of progress bar
* @type string
*/
strokeColor?: string | ProgressGradient;
/**
* segmented success percent, works when type="line"
* @default 0
* @type number
*/
successPercent: number;
/**
* segmented success percent, works when type="line"
* @default 0
* @type number
*/
successPercent?: number;
/**
* to set the type, options: line circle dashboard
* @default 'line'
* @type string
*/
type: 'line' | 'circle' | 'dashboard';
/**
* to set the type, options: line circle dashboard
* @default 'line'
* @type string
*/
type?: 'line' | 'circle' | 'dashboard';
/**
* to set the canvas width of the circular progress bar, unit: px
* @default 120
* @type number
*/
width: number;
/**
* to set the canvas width of the circular progress bar, unit: px
* @default 120
* @type number
*/
width?: number;
}
}

View File

@ -2,12 +2,15 @@
// Definitions by: akki-jat <https://github.com/akki-jat>
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { Radio } from './radio';
import { RadioProps, Radio } from './radio';
export declare class RadioButton extends Radio {
declare class RadioButtonProps extends RadioProps {
/**
* Type of radio button
* @type string
*/
type: 'primary' | 'danger' | 'dashed' | 'ghost' | 'default';
* Type of radio button
* @type string
*/
type?: 'primary' | 'danger' | 'dashed' | 'ghost' | 'default';
}
export declare class RadioButton extends Radio {
$props: RadioButtonProps
}

View File

@ -5,48 +5,54 @@
import { AntdComponent } from '../component';
export declare class RadioGroup extends AntdComponent {
/**
$props: {
/**
* Specifies the initial state: whether or not the radio is selected.
* @type boolean
*/
defaultValue: boolean;
defaultValue?: any;
/**
* Disable radio
* @default false
* @type boolean
*/
disabled: boolean;
/**
* Disable radio
* @default false
* @type boolean
*/
disabled?: boolean;
/**
* The name property of all input[type="radio"] children
* @type string
*/
name: string;
/**
* The name property of all input[type="radio"] children
* @type string
*/
name?: string;
/**
* set children optional
* @type Array<string | { label: string, value: string, disabled?: boolean }>
*/
options: Array<string | { label: string; value: string; disabled?: boolean }>;
/**
* set children optional
* @type Array<string | { label: string, value: string, disabled?: boolean }>
*/
options?: Array<string | { label: string; value: string; disabled?: boolean }>;
/**
* size for radio button style
* @default 'default'
* @type String
*/
size: 'large' | 'default' | 'small';
/**
* size for radio button style
* @default 'default'
* @type String
*/
size?: 'large' | 'default' | 'small';
/**
* Used for setting the currently selected value.
* @type any
*/
value: any;
/**
* Used for setting the currently selected value.
* @type any
*/
value?: any;
/**
* style type of radio button
* @default 'outline'
* @type string
*/
buttonStyle: 'outline' | 'solid';
/**
* style type of radio button
* @default 'outline'
* @type string
*/
buttonStyle?: 'outline' | 'solid';
/**
* The callback function that is triggered when the state changes.
*/
onChange?:(e:Event)=>void
}
}

View File

@ -6,42 +6,43 @@ import { AntdComponent } from '../component';
import { RadioGroup } from './radio-group';
import { RadioButton } from './radio-button';
export declare class Radio extends AntdComponent {
static Group: typeof RadioGroup;
static Button: typeof RadioButton;
export declare class RadioProps {
/**
* get focus when component mounted
* @default false
* @type boolean
*/
autofocus: boolean;
* get focus when component mounted
* @default false
* @type boolean
*/
autofocus?: boolean;
/**
* Specifies whether the radio is selected.
* @type boolean
*/
checked: boolean;
checked?: boolean;
/**
* Specifies the initial state: whether or not the radio is selected.
* @type boolean
*/
defaultChecked: boolean;
defaultChecked?: boolean;
/**
* Disable radio
* @default false
* @type boolean
*/
disabled: boolean;
disabled?: boolean;
/**
* According to value for comparison, to determine whether the selected
* @type any
*/
value: any;
value?: any;
}
export declare class Radio extends AntdComponent {
static Group: typeof RadioGroup;
static Button: typeof RadioButton;
$props: RadioProps
/**
* remove focus
*/

92
types/rate.d.ts vendored
View File

@ -3,65 +3,67 @@
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from './component';
import { VNodeChild } from 'vue';
export declare class Rate extends AntdComponent {
/**
$props: {
/**
* whether to allow clear when click again
* @default true
* @type boolean
*/
allowClear: boolean;
allowClear?: boolean;
/**
* whether to allow semi selection
* @default false
* @type boolean
*/
allowHalf: boolean;
/**
* whether to allow semi selection
* @default false
* @type boolean
*/
allowHalf?: boolean;
/**
* get focus when component mounted
* @default false
* @type boolean
*/
autofocus: boolean;
/**
* get focus when component mounted
* @default false
* @type boolean
*/
autofocus?: boolean;
/**
* custom character of rate
* @default <StarOutlined />
* @type any (String or slot="character")
*/
character: any;
/**
* custom character of rate
* @default <StarOutlined />
* @type any (String or slot="character")
*/
character?: VNodeChild | JSX.Element;
/**
* star count
* @default 5
* @type number
*/
count: number;
/**
* star count
* @default 5
* @type number
*/
count?: number;
/**
* default value
* @default 0
* @type number
*/
defaultValue: number;
/**
* default value
* @default 0
* @type number
*/
defaultValue?: number;
/**
* read only, unable to interact
* @default false
* @type boolean
*/
disabled: boolean;
/**
* read only, unable to interact
* @default false
* @type boolean
*/
disabled?: boolean;
/**
* current value
* @type number
*/
value: number;
/**
* current value
* @type number
*/
value?: number;
tooltips: Array<string>;
tooltips?: Array<string>;
}
/**
* remove focus
*/

View File

@ -3,17 +3,21 @@
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from '../component';
import { VNodeChild } from 'vue';
export declare class OptionGroup extends AntdComponent {
/**
$props: {
/**
* Key
* @type string
*/
key: string;
key?: string;
/**
* Group label
* @type any (string | slot)
*/
label?: VNodeChild | JSX.Element;
}
/**
* Group label
* @type any (string | slot)
*/
label: any;
}

View File

@ -5,34 +5,37 @@
import { AntdComponent } from '../component';
export declare class Option extends AntdComponent {
/**
* Disable this option
* @default false
* @type boolean
*/
disabled: boolean;
$props: {
/**
* Disable this option
* @default false
* @type boolean
*/
disabled?: boolean;
/**
* Same usage as value. If Vue request you to set this property, you can set it to value of option, and then omit value property.
* @type string
*/
key: string;
/**
* Same usage as value. If Vue request you to set this property, you can set it to value of option, and then omit value property.
* @type string
*/
key?: string;
/**
* title of Select after select this Option
* @type string
*/
title: string;
/**
* title of Select after select this Option
* @type string
*/
title?: string;
/**
* default to filter with this property
* @type string | number
*/
value: string | number;
/**
* default to filter with this property
* @type string | number
*/
value?: string | number;
/**
* additional class to option
* @type string
*/
class?: string;
}
/**
* additional class to option
* @type string
*/
class: string;
}

View File

@ -5,248 +5,252 @@
import { AntdComponent } from '../component';
import { Option } from './option';
import { OptionGroup } from './option-group';
import { VNode } from 'vue';
import { VNodeChild, CSSProperties } from 'vue';
type dropdownRenderProps = {
menu?: VNodeChild,
props?: object
}
export declare class Select extends AntdComponent {
static Option: typeof Option;
static OptGroup: typeof OptionGroup;
$props: {
/**
* Show clear button.
* @default false
* @type boolean
*/
allowClear?: boolean;
/**
* Show clear button.
* @default false
* @type boolean
*/
allowClear: boolean;
/**
* Whether the current search will be cleared on selecting an item. Only applies when mode is set to multiple or tags.
* @default true
* @type boolean
*/
autoClearSearchValue?: boolean;
/**
* Whether the current search will be cleared on selecting an item. Only applies when mode is set to multiple or tags.
* @default true
* @type boolean
*/
autoClearSearchValue: boolean;
/**
* Get focus by default
* @default false
* @type boolean
*/
autofocus?: boolean;
/**
* Get focus by default
* @default false
* @type boolean
*/
autofocus: boolean;
/**
* Whether active first option by default
* @default true
* @type boolean
*/
defaultActiveFirstOption?: boolean;
/**
* Whether active first option by default
* @default true
* @type boolean
*/
defaultActiveFirstOption: boolean;
/**
* Initial selected option.
* @type string | number | Array<string | number>
*/
defaultValue?: string | number | Array<string | number>;
/**
* Initial selected option.
* @type string | number | Array<string | number>
*/
defaultValue: string | number | Array<string | number>;
/**
* Whether disabled select
* @default false
* @type boolean
*/
disabled: boolean;
/**
* className of dropdown menu
* @type string
*/
dropdownClassName: string;
/**
* Whether dropdown's width is same with select.
* @default true
* @type boolean
*/
dropdownMatchSelectWidth: boolean;
/**
* Customize dropdown content
* @type function | slot-scope
*/
dropdownRender?: (menu?: VNode, props?: object) => VNode;
/**
* style of dropdown menu
* @type object
*/
dropdownStyle: object;
/**
* If true, filter options by input, if function, filter options against it. The function will receive two arguments, inputValue and option,
* if the function returns true, the option will be included in the filtered set; Otherwise, it will be excluded.
* @default true
* @type boolean | Function
*/
filterOption: boolean | Function;
/**
* Value of action option by default
* @type string | string[]
*/
firstActiveValue: string | string[];
/**
* Parent Node which the selector should be rendered to. Default to body.
* When position issues happen, try to modify it into scrollable content and position it relative.
* @default () => document.body
* @type Function
*/
getPopupContainer: (triggerNode: any) => any;
/**
* whether to embed label in value, turn the format of value from string to {key: string, label: vNodes}
* @default false
* @type boolean
*/
labelInValue: boolean;
/**
* Max tag count to show
* @type number
*/
maxTagCount: number;
/**
* Placeholder for not showing tags
* @type any (slot | Function)
*/
maxTagPlaceholder: any;
/**
* Max text length to show
* @type number
*/
maxTagTextLength: number;
/**
* Set mode of Select
* @default 'default'
* @type string
*/
mode: 'default' | 'multiple' | 'tags';
/**
* Specify content to show when no result matches..
* @default 'Not Found'
* @type any (string | slot)
*/
notFoundContent: any;
/**
* Which prop value of option will be used for filter if filterOption is true
* @default 'value'
* @type string
*/
optionFilterProp: string;
/**
* Which prop value of option will render as content of select.
* @default 'value' for combobox, 'children' for other modes
* @type string
*/
optionLabelProp: string;
/**
* Placeholder of select
* @type any (string | slot)
*/
placeholder: any;
/**
* Whether show search input in single mode.
* @default false
* @type boolean
*/
showSearch: boolean;
/**
* Whether to show the drop-down arrow
* @default true
* @type boolean
*/
showArrow: boolean;
/**
* Size of Select input. default large small
* @default 'default'
* @type string
*/
size: 'default' | 'large' | 'small';
/**
* The custom suffix icon
* @type any (VNode | slot)
*/
suffixIcon: any;
/**
* The custom remove icon
* @type any (VNode | slot)
*/
removeIcon: any;
/**
* The custom clear icon
* @type any (VNode | slot)
*/
clearIcon: any;
/**
* The custom menuItemSelected icon
* @type any (VNode | slot)
*/
menuItemSelectedIcon: any;
/**
* Separator used to tokenize on tag/multiple mode
* @type string[]
*/
tokenSeparators: string[];
/**
* Current selected option.
* @type string | number | Array<string | number>
*/
value: string | number | Array<string | number>;
/**
* Data of the selectOption, manual construction work is no longer needed if this property has been set
* @default []
* @type Array<{ value; label; disabled?; key?; title? }>
*/
options: Array<{
value: any;
label: any;
/**
* Whether disabled select
* @default false
* @type boolean
*/
disabled?: boolean;
key?: any;
title?: any;
}>;
/**
* Initial open state of dropdown
* @type boolean
*/
defaultOpen: boolean;
/**
* className of dropdown menu
* @type string
*/
dropdownClassName?: string;
/**
* Controlled open state of dropdown
* @type boolean
*/
open: boolean;
/**
* Whether dropdown's width is same with select.
* @default true
* @type boolean
*/
dropdownMatchSelectWidth?: boolean;
/**
* remove focus
*/
blur(): void;
/**
* Customize dropdown content
* @type function | slot-scope
*/
dropdownRender?: (props:dropdownRenderProps) => VNodeChild;
/**
* get focus
*/
focus(): void;
/**
* style of dropdown menu
* @type object
*/
dropdownStyle?: CSSProperties;
/**
* If true, filter options by input, if function, filter options against it. The function will receive two arguments, inputValue and option,
* if the function returns true, the option will be included in the filtered set; Otherwise, it will be excluded.
* @default true
* @type boolean | Function
*/
filterOption?: boolean | Function;
/**
* Value of action option by default
* @type string | string[]
*/
firstActiveValue?: string | string[];
/**
* Parent Node which the selector should be rendered to. Default to body.
* When position issues happen, try to modify it into scrollable content and position it relative.
* @default () => document.body
* @type Function
*/
getPopupContainer?: (triggerNode: any) => any;
/**
* whether to embed label in value, turn the format of value from string to {key: string, label: vNodes}
* @default false
* @type boolean
*/
labelInValue?: boolean;
/**
* Max tag count to show
* @type number
*/
maxTagCount?: number;
/**
* Placeholder for not showing tags
* @type any (slot | Function)
*/
maxTagPlaceholder?: VNodeChild | JSX.Element | Function;
/**
* Max text length to show
* @type number
*/
maxTagTextLength?: number;
/**
* Set mode of Select
* @default 'default'
* @type string
*/
mode?: 'default' | 'multiple' | 'tags';
/**
* Specify content to show when no result matches..
* @default 'Not Found'
* @type any (string | slot)
*/
notFoundContent?: VNodeChild | JSX.Element;
/**
* Which prop value of option will be used for filter if filterOption is true
* @default 'value'
* @type string
*/
optionFilterProp?: string;
/**
* Which prop value of option will render as content of select.
* @default 'value' for combobox, 'children' for other modes
* @type string
*/
optionLabelProp?: string;
/**
* Placeholder of select
* @type any (string | slot)
*/
placeholder?: VNodeChild | JSX.Element
/**
* Whether show search input in single mode.
* @default false
* @type boolean
*/
showSearch?: boolean;
/**
* Whether to show the drop-down arrow
* @default true
* @type boolean
*/
showArrow?: boolean;
/**
* Size of Select input. default large small
* @default 'default'
* @type string
*/
size?: 'default' | 'large' | 'small';
/**
* The custom suffix icon
* @type any (VNode | slot)
*/
suffixIcon?: VNodeChild | JSX.Element
/**
* The custom remove icon
* @type any (VNode | slot)
*/
removeIcon?: VNodeChild | JSX.Element
/**
* The custom clear icon
* @type any (VNode | slot)
*/
clearIcon?: VNodeChild | JSX.Element
/**
* The custom menuItemSelected icon
* @type any (VNode | slot)
*/
menuItemSelectedIcon?: VNodeChild | JSX.Element
/**
* Separator used to tokenize on tag/multiple mode
* @type string[]
*/
tokenSeparators?: string[];
/**
* Current selected option.
* @type string | number | Array<string | number>
*/
value?: string | number | Array<string | number>;
/**
* Data of the selectOption, manual construction work is no longer needed if this property has been set
* @default []
* @type Array<{ value; label; disabled?; key?; title? }>
*/
options?: Array<{
value: any;
label: any;
disabled?: boolean;
key?: any;
title?: any;
}>;
/**
* Initial open state of dropdown
* @type boolean
*/
defaultOpen?: boolean;
/**
* Controlled open state of dropdown
* @type boolean
*/
open?: boolean;
/**
* remove focus
*/
onBlur: (e?: Event) => void
/**
* get focus
*/
onFocus: (e?: Event) => void
}
}

67
types/spin.d.ts vendored
View File

@ -3,6 +3,7 @@
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from './component';
import { VNodeChild } from 'vue';
export declare class Spin extends AntdComponent {
/**
@ -10,42 +11,44 @@ export declare class Spin extends AntdComponent {
* @param param0 indicator
*/
static setDefaultIndicator({ indicator }: { indicator: any }): void;
$props: {
/**
* specifies a delay in milliseconds for loading state (prevent flush)
* @type number (milliseconds)
*/
delay: number;
/**
* specifies a delay in milliseconds for loading state (prevent flush)
* @type number (milliseconds)
*/
delay?: number;
/**
* vue node of the spinning indicator
* @type any (VNode | slot)
*/
indicator: any;
/**
* vue node of the spinning indicator
* @type any (VNode | slot)
*/
indicator?: VNodeChild | JSX.Element;
/**
* size of Spin, options: small, default and large
* @default 'default'
* @type string
*/
size: 'small' | 'default' | 'large';
/**
* size of Spin, options: small, default and large
* @default 'default'
* @type string
*/
size?: 'small' | 'default' | 'large';
/**
* whether Spin is spinning
* @default true
* @type boolean
*/
spinning: boolean;
/**
* whether Spin is spinning
* @default true
* @type boolean
*/
spinning?: boolean;
/**
* customize description content when Spin has children
* @type string
*/
tip: string;
/**
* customize description content when Spin has children
* @type string
*/
tip?: string;
/**
* className of wrapper when Spin has children
* @type string
*/
wrapperClassName: string;
/**
* className of wrapper when Spin has children
* @type string
*/
wrapperClassName?: string;
}
}

View File

@ -3,32 +3,41 @@
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from '../component';
import { VNode } from 'vue';
import { VNodeChild, CSSProperties } from 'vue';
export declare class StatisticCountdown extends AntdComponent {
format: string;
/**
* prefix node of value
* @type string | VNode
*/
prefix: string | VNode;
$props:{
/**
* Format as moment
* @default 'HH:mm:ss'
*/
format?: string;
/**
* prefix node of value
* @type string | VNode
*/
prefix?: VNodeChild | JSX.Element;
/**
* suffix node of value
* @type string | VNode
*/
suffix: string | VNode;
/**
* suffix node of value
* @type string | VNode
*/
suffix?: VNodeChild | JSX.Element;
/**
* Display title
* @type string | VNode
*/
title: string | VNode;
/**
* Display title
* @type string | VNode
*/
title?: VNodeChild | JSX.Element;
/**
* Display value
* @type string or number
*/
value: string | number;
valueStyle: object;
/**
* Display value
* @type string or number
*/
value?: string | number;
/**
* Set value css style
*/
valueStyle?: CSSProperties;
}
}

View File

@ -3,58 +3,60 @@
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from '../component';
import { VNode } from 'vue';
import { VNodeChild } from 'vue';
import { StatisticCountdown } from './statistic-countdown';
export declare class Statistic extends AntdComponent {
static Countdown: typeof StatisticCountdown;
/**
$props: {
/**
* decimal separator
* @default '.'
* @type string
*/
decimalSeparator: string;
decimalSeparator?: string;
/**
* the shape of statistic
* @type string
*/
formatter: () => VNode;
/**
* the shape of statistic
* @type string
*/
formatter?: () => VNodeChild | JSX.Element;
/**
* group separator
* @default ','
* @type string
*/
groupSeparator: string;
/**
* group separator
* @default ','
* @type string
*/
groupSeparator?: string;
/**
* precision of input value
* @type number
*/
precision: number;
/**
* precision of input value
* @type number
*/
precision?: number;
/**
* prefix node of value
* @type string | VNode
*/
prefix: string | VNode;
/**
* prefix node of value
* @type string | VNodeChild
*/
prefix?: VNodeChild | JSX.Element;
/**
* suffix node of value
* @type string | VNode
*/
suffix: string | VNode;
/**
* suffix node of value
* @type string | VNodeChild
*/
suffix?: VNodeChild | JSX.Element;
/**
* Display title
* @type string | VNode
*/
title: string | VNode;
/**
* Display title
* @type string | VNodeChild
*/
title?: VNodeChild | JSX.Element;
/**
* Display value
* @type string or number
*/
value: string | number;
/**
* Display value
* @type string or number
*/
value?: string | number;
}
}

50
types/steps/step.d.ts vendored
View File

@ -3,32 +3,34 @@
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from '../component';
import {VNodeChild} from 'vue';
export declare class Step extends AntdComponent {
/**
* description of the step, optional property
* @type any (string | slot)
*/
description: any;
$props: {
/**
* description of the step, optional property
* @type any (string | slot)
*/
description?: VNodeChild | JSX.Element;
/**
* icon of the step, optional property
* @type any (string | slot)
*/
icon: any;
/**
* icon of the step, optional property
* @type any (string | slot)
*/
icon?: VNodeChild | JSX.Element;
/**
* to specify the status. It will be automatically set by current of Steps if not configured. Optional values are: wait process finish error
* @default 'wait'
* @type string
*/
status: 'wait' | 'process' | 'finish' | 'error';
/**
* to specify the status. It will be automatically set by current of Steps if not configured. Optional values are: wait process finish error
* @default 'wait'
* @type string
*/
status?: 'wait' | 'process' | 'finish' | 'error';
/**
* title of the step
* @type any (string | slot)
*/
title: any;
disabled: boolean;
subTitle: any;
/**
* title of the step
* @type any (string | slot)
*/
title?: VNodeChild | JSX.Element;
disabled?: boolean;
subTitle?: VNodeChild | JSX.Element;
}
}

View File

@ -7,53 +7,55 @@ import { Step } from './step';
export declare class Steps extends AntdComponent {
static Step: typeof Step;
type: 'default' | 'navigation';
/**
* to set the current step, counting from 0. You can overwrite this state by using status of Step
* @default 0
* @type number
*/
current: number;
$props: {
type?: 'default' | 'navigation';
/**
* to set the current step, counting from 0. You can overwrite this state by using status of Step
* @default 0
* @type number
*/
current?: number;
/**
* set the initial step, counting from 0
* @default 0
* @type number
*/
initial: number;
/**
* set the initial step, counting from 0
* @default 0
* @type number
*/
initial?: number;
/**
* support vertial title and description
* @default 'horizontal'
* @type string
*/
labelPlacement: 'horizontal' | 'vertical';
/**
* support vertial title and description
* @default 'horizontal'
* @type string
*/
labelPlacement?: 'horizontal' | 'vertical';
/**
* to specify the status of current step, can be set to one of the following values: wait process finish error
* @default 'process'
* @type string
*/
status: 'wait' | 'process' | 'finish' | 'error';
/**
* to specify the status of current step, can be set to one of the following values: wait process finish error
* @default 'process'
* @type string
*/
status?: 'wait' | 'process' | 'finish' | 'error';
/**
* to specify the size of the step bar, default and small are currently supported
* @default 'default'
* @type string
*/
size: 'default' | 'small';
/**
* to specify the size of the step bar, default and small are currently supported
* @default 'default'
* @type string
*/
size?: 'default' | 'small';
/**
* to specify the direction of the step bar, horizontal and vertical are currently supported
* @default 'horizontal'
* @type string
*/
direction: 'horizontal' | 'vertical';
/**
* to specify the direction of the step bar, horizontal and vertical are currently supported
* @default 'horizontal'
* @type string
*/
direction?: 'horizontal' | 'vertical';
/**
* Steps with progress dot style, customize the progress dot by setting a scoped slot. labelPlacement will be vertical
* @default false
* @type boolean | Funtion
*/
progressDot: boolean | Function;
/**
* Steps with progress dot style, customize the progress dot by setting a scoped slot. labelPlacement will be vertical
* @default false
* @type boolean | Funtion
*/
progressDot?: boolean | Function;
}
}