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
pull/2705/head
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

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

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

View File

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

12
types/pagination.d.ts vendored
View File

@ -3,9 +3,14 @@
// Definitions: https://github.com/vueComponent/ant-design-vue/types // Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from './component'; import { AntdComponent } from './component';
import { VNode } from 'vue'; import { VNodeChild } from 'vue';
interface PaginationRenderProps {
page: number
type: 'page' | 'prev' | 'next'
originalElement: any
}
export declare class Pagination extends AntdComponent { export declare class Pagination extends AntdComponent {
$props: {
/** /**
* total number of data items * total number of data items
* @default 0 * @default 0
@ -90,5 +95,6 @@ export declare class Pagination extends AntdComponent {
* to customize item innerHTML * to customize item innerHTML
* @type Function * @type Function
*/ */
itemRender?: (page: number, type: 'page' | 'prev' | 'next', originalElement: any) => VNode; itemRender?: (props:PaginationRenderProps) => VNodeChild | JSX.Element;
}
} }

21
types/popconfirm.d.ts vendored
View File

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

8
types/popover.d.ts vendored
View File

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

26
types/progress.d.ts vendored
View File

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

View File

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

View File

@ -5,48 +5,54 @@
import { AntdComponent } from '../component'; import { AntdComponent } from '../component';
export declare class RadioGroup extends AntdComponent { export declare class RadioGroup extends AntdComponent {
$props: {
/** /**
* Specifies the initial state: whether or not the radio is selected. * Specifies the initial state: whether or not the radio is selected.
* @type boolean * @type boolean
*/ */
defaultValue: boolean; defaultValue?: any;
/** /**
* Disable radio * Disable radio
* @default false * @default false
* @type boolean * @type boolean
*/ */
disabled: boolean; disabled?: boolean;
/** /**
* The name property of all input[type="radio"] children * The name property of all input[type="radio"] children
* @type string * @type string
*/ */
name: string; name?: string;
/** /**
* set children optional * set children optional
* @type Array<string | { label: string, value: string, disabled?: boolean }> * @type Array<string | { label: string, value: string, disabled?: boolean }>
*/ */
options: Array<string | { label: string; value: string; disabled?: boolean }>; options?: Array<string | { label: string; value: string; disabled?: boolean }>;
/** /**
* size for radio button style * size for radio button style
* @default 'default' * @default 'default'
* @type String * @type String
*/ */
size: 'large' | 'default' | 'small'; size?: 'large' | 'default' | 'small';
/** /**
* Used for setting the currently selected value. * Used for setting the currently selected value.
* @type any * @type any
*/ */
value: any; value?: any;
/** /**
* style type of radio button * style type of radio button
* @default 'outline' * @default 'outline'
* @type string * @type string
*/ */
buttonStyle: 'outline' | 'solid'; 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 { RadioGroup } from './radio-group';
import { RadioButton } from './radio-button'; import { RadioButton } from './radio-button';
export declare class Radio extends AntdComponent { export declare class RadioProps {
static Group: typeof RadioGroup;
static Button: typeof RadioButton;
/** /**
* get focus when component mounted * get focus when component mounted
* @default false * @default false
* @type boolean * @type boolean
*/ */
autofocus: boolean; autofocus?: boolean;
/** /**
* Specifies whether the radio is selected. * Specifies whether the radio is selected.
* @type boolean * @type boolean
*/ */
checked: boolean; checked?: boolean;
/** /**
* Specifies the initial state: whether or not the radio is selected. * Specifies the initial state: whether or not the radio is selected.
* @type boolean * @type boolean
*/ */
defaultChecked: boolean; defaultChecked?: boolean;
/** /**
* Disable radio * Disable radio
* @default false * @default false
* @type boolean * @type boolean
*/ */
disabled: boolean; disabled?: boolean;
/** /**
* According to value for comparison, to determine whether the selected * According to value for comparison, to determine whether the selected
* @type any * @type any
*/ */
value: any; value?: any;
}
export declare class Radio extends AntdComponent {
static Group: typeof RadioGroup;
static Button: typeof RadioButton;
$props: RadioProps
/** /**
* remove focus * remove focus
*/ */

22
types/rate.d.ts vendored
View File

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

View File

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

View File

@ -5,34 +5,37 @@
import { AntdComponent } from '../component'; import { AntdComponent } from '../component';
export declare class Option extends AntdComponent { export declare class Option extends AntdComponent {
$props: {
/** /**
* Disable this option * Disable this option
* @default false * @default false
* @type boolean * @type boolean
*/ */
disabled: 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. * 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 * @type string
*/ */
key: string; key?: string;
/** /**
* title of Select after select this Option * title of Select after select this Option
* @type string * @type string
*/ */
title: string; title?: string;
/** /**
* default to filter with this property * default to filter with this property
* @type string | number * @type string | number
*/ */
value: string | number; value?: string | number;
/** /**
* additional class to option * additional class to option
* @type string * @type string
*/ */
class: string; class?: string;
}
} }

View File

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

15
types/spin.d.ts vendored
View File

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

View File

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

View File

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

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

@ -3,32 +3,34 @@
// Definitions: https://github.com/vueComponent/ant-design-vue/types // Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from '../component'; import { AntdComponent } from '../component';
import {VNodeChild} from 'vue';
export declare class Step extends AntdComponent { export declare class Step extends AntdComponent {
$props: {
/** /**
* description of the step, optional property * description of the step, optional property
* @type any (string | slot) * @type any (string | slot)
*/ */
description: any; description?: VNodeChild | JSX.Element;
/** /**
* icon of the step, optional property * icon of the step, optional property
* @type any (string | slot) * @type any (string | slot)
*/ */
icon: any; 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 * 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' * @default 'wait'
* @type string * @type string
*/ */
status: 'wait' | 'process' | 'finish' | 'error'; status?: 'wait' | 'process' | 'finish' | 'error';
/** /**
* title of the step * title of the step
* @type any (string | slot) * @type any (string | slot)
*/ */
title: any; title?: VNodeChild | JSX.Element;
disabled: boolean; disabled?: boolean;
subTitle: any; subTitle?: VNodeChild | JSX.Element;
}
} }

View File

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