style: pretty-quick

pull/2777/head
tangjinzhou 2020-08-30 22:59:47 +08:00
parent 83f7c6ed41
commit 382f603301
39 changed files with 208 additions and 208 deletions

2
types/cascader.d.ts vendored
View File

@ -198,7 +198,7 @@ export declare class Cascader extends AntdComponent {
* @type Array<string | number> * @type Array<string | number>
*/ */
value?: Array<string | number>; value?: Array<string | number>;
} };
/** /**
* remove focus * remove focus
*/ */

2
types/comment.d.ts vendored
View File

@ -35,5 +35,5 @@ export declare class Comment extends AntdComponent {
* @type any ( string | slot) * @type any ( string | slot)
*/ */
datetime?: VNodeChild | JSX.Element; datetime?: VNodeChild | JSX.Element;
} };
} }

View File

@ -18,14 +18,20 @@ export declare class DropdownButton extends AntdComponent {
* the dropdown menu * the dropdown menu
* @type () => Menu * @type () => Menu
*/ */
overlay?: () => Menu overlay?: () => Menu;
/** /**
* placement of pop menu: bottomLeft bottomCenter bottomRight topLeft topCenter topRight * placement of pop menu: bottomLeft bottomCenter bottomRight topLeft topCenter topRight
* @default 'bottomLeft' * @default 'bottomLeft'
* @type string * @type string
*/ */
placement?: 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight'; placement?:
| 'topLeft'
| 'topCenter'
| 'topRight'
| 'bottomLeft'
| 'bottomCenter'
| 'bottomRight';
/** /**
* size of the button, the same as Button * size of the button, the same as Button
@ -57,5 +63,5 @@ export declare class DropdownButton extends AntdComponent {
* Icon (appears on the right) (1.5.0) * Icon (appears on the right) (1.5.0)
*/ */
icon?: VNodeChild | JSX.Element; icon?: VNodeChild | JSX.Element;
} };
} }

View File

@ -11,17 +11,17 @@ export declare class Dropdown extends AntdComponent {
static Button: typeof DropdownButton; static Button: typeof DropdownButton;
$props: { $props: {
/** /**
* the trigger mode which executes the drop-down action * the trigger mode which executes the drop-down action
* @default ['hover'] * @default ['hover']
* @type string[] * @type string[]
*/ */
trigger?: Array<'click' | 'hover' | 'contextmenu'>; trigger?: Array<'click' | 'hover' | 'contextmenu'>;
/** /**
* the dropdown menu * the dropdown menu
* @type () => Menu * @type () => Menu
*/ */
overlay?: () => Menu overlay?: () => Menu;
/** /**
* Class name of the dropdown root element * Class name of the dropdown root element
@ -59,6 +59,12 @@ export declare class Dropdown extends AntdComponent {
* @default 'bottomLeft' * @default 'bottomLeft'
* @type string * @type string
*/ */
placement?: 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight'; placement?:
} | 'topLeft'
| 'topCenter'
| 'topRight'
| 'bottomLeft'
| 'bottomCenter'
| 'bottomRight';
};
} }

3
types/grid/col.d.ts vendored
View File

@ -83,6 +83,5 @@ export declare class Col extends AntdComponent {
* @type { span: ColSpanType, offset: ColSpanType } | ColSpanType * @type { span: ColSpanType, offset: ColSpanType } | ColSpanType
*/ */
xxl?: { span: ColSpanType; offset: ColSpanType } | ColSpanType; xxl?: { span: ColSpanType; offset: ColSpanType } | ColSpanType;
} };
} }

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

@ -7,20 +7,20 @@ import { AntdComponent } from '../component';
type Gutter = type Gutter =
| number | number
| { | {
xs: number; xs: number;
sm: number; sm: number;
md: number; md: number;
lg: number; lg: number;
xl: number; xl: number;
xxl: number; xxl: number;
}; };
export declare class Row extends AntdComponent { export declare class Row extends AntdComponent {
$props: { $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];
/** /**
@ -42,5 +42,5 @@ export declare class Row extends AntdComponent {
* @type string * @type string
*/ */
justify?: 'start' | 'end' | 'center' | 'space-around' | 'space-between'; justify?: 'start' | 'end' | 'center' | 'space-around' | 'space-between';
} };
} }

View File

@ -83,5 +83,5 @@ export declare class InputNumber extends AntdComponent {
* @type number | string * @type number | string
*/ */
value?: number | string; value?: number | string;
} };
} }

View File

@ -19,5 +19,5 @@ export declare class InputGroup extends AntdComponent {
* @type string * @type string
*/ */
size?: 'small' | 'large' | 'default'; size?: 'small' | 'large' | 'default';
} };
} }

View File

@ -13,5 +13,5 @@ export declare class InputSearch extends AntdComponent {
* @type any (boolean | slot) * @type any (boolean | slot)
*/ */
enterButton?: boolean | VNodeChild | JSX.Element; enterButton?: boolean | VNodeChild | JSX.Element;
} };
} }

View File

@ -81,5 +81,5 @@ export declare class Input extends AntdComponent {
* allow to remove input content with clear icon * allow to remove input content with clear icon
*/ */
allowClear?: boolean; allowClear?: boolean;
} };
} }

View File

@ -5,12 +5,11 @@
import { AntdComponent } from '../component'; import { AntdComponent } from '../component';
export declare class Password extends AntdComponent { export declare class Password extends AntdComponent {
$props:{ $props: {
/** /**
* Whether show toggle button * Whether show toggle button
* @default true * @default true
*/ */
visibilityToggle?: boolean; visibilityToggle?: boolean;
} };
} }

View File

@ -71,5 +71,5 @@ export declare class Mentions extends AntdComponent {
* @default () => HTMLElement * @default () => HTMLElement
*/ */
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement; getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
} };
} }

View File

@ -6,10 +6,10 @@ import { AntdComponent } from '../component';
export declare class Option extends AntdComponent { export declare class Option extends AntdComponent {
$props: { $props: {
/** /**
* value of suggestion, the value will insert into input filed while selected * value of suggestion, the value will insert into input filed while selected
* @default '' * @default ''
* @type string * @type string
*/ */
value?: string; value?: string;
} };
} }

View File

@ -24,5 +24,5 @@ export declare class MenuItem extends AntdComponent {
* @type string * @type string
*/ */
title?: string; title?: string;
} };
} }

View File

@ -106,5 +106,5 @@ export declare class Menu extends AntdComponent {
* @type boolean * @type boolean
*/ */
inlineCollapsed?: boolean; inlineCollapsed?: boolean;
} };
} }

View File

@ -9,9 +9,9 @@ import { VNodeChild } from 'vue';
export declare class SubMenu extends AntdComponent { export declare class SubMenu extends AntdComponent {
$props: { $props: {
/** /**
* unique id of the menu item * unique id of the menu item
* @type string * @type string
*/ */
key?: string; key?: string;
/** /**
@ -30,5 +30,5 @@ export declare class SubMenu extends AntdComponent {
* Sub-menu class name (1.5.0) * Sub-menu class name (1.5.0)
*/ */
popupClassName?: string; popupClassName?: string;
} };
} }

View File

@ -70,6 +70,5 @@ export declare class PageHeader extends AntdComponent {
* Specify a callback that will be called when a user clicks backIcon. * Specify a callback that will be called when a user clicks backIcon.
*/ */
onBack(): () => void; onBack(): () => void;
} };
} }

10
types/pagination.d.ts vendored
View File

@ -5,9 +5,9 @@
import { AntdComponent } from './component'; import { AntdComponent } from './component';
import { VNodeChild } from 'vue'; import { VNodeChild } from 'vue';
interface PaginationRenderProps { interface PaginationRenderProps {
page: number page: number;
type: 'page' | 'prev' | 'next' type: 'page' | 'prev' | 'next';
originalElement: any originalElement: any;
} }
export declare class Pagination extends AntdComponent { export declare class Pagination extends AntdComponent {
$props: { $props: {
@ -95,6 +95,6 @@ export declare class Pagination extends AntdComponent {
* to customize item innerHTML * to customize item innerHTML
* @type Function * @type Function
*/ */
itemRender?: (props:PaginationRenderProps) => VNodeChild | JSX.Element; itemRender?: (props: PaginationRenderProps) => VNodeChild | JSX.Element;
} };
} }

View File

@ -46,6 +46,5 @@ export declare class Popconfirm extends AntdComponent {
* @type boolean * @type boolean
*/ */
disabled?: boolean; disabled?: boolean;
} & TooltipCommon } & TooltipCommon;
} }

2
types/popover.d.ts vendored
View File

@ -18,5 +18,5 @@ export declare class Popover extends AntdComponent {
* @type any (string | slot | VNode) * @type any (string | slot | VNode)
*/ */
title?: VNodeChild | JSX.Element; title?: VNodeChild | JSX.Element;
} & TooltipCommon } & TooltipCommon;
} }

10
types/progress.d.ts vendored
View File

@ -10,10 +10,10 @@ export type ProgressGradient = { direction?: string } & (StringGradients | FromT
export declare class Progress extends AntdComponent { export declare class Progress extends AntdComponent {
$props: { $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;
/** /**
@ -92,5 +92,5 @@ export declare class Progress extends AntdComponent {
* @type number * @type number
*/ */
width?: number; width?: number;
} };
} }

View File

@ -6,11 +6,11 @@ import { RadioProps, Radio } from './radio';
declare class RadioButtonProps extends RadioProps { 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 { export declare class RadioButton extends Radio {
$props: RadioButtonProps $props: RadioButtonProps;
} }

View File

@ -7,9 +7,9 @@ import { AntdComponent } from '../component';
export declare class RadioGroup extends AntdComponent { export declare class RadioGroup extends AntdComponent {
$props: { $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?: any; defaultValue?: any;
/** /**
@ -53,6 +53,6 @@ export declare class RadioGroup extends AntdComponent {
/** /**
* The callback function that is triggered when the state changes. * The callback function that is triggered when the state changes.
*/ */
onChange?:(e:Event)=>void onChange?: (e: Event) => void;
} };
} }

View File

@ -8,10 +8,10 @@ import { RadioButton } from './radio-button';
export declare class RadioProps { export declare class RadioProps {
/** /**
* get focus when component mounted * get focus when component mounted
* @default false * @default false
* @type boolean * @type boolean
*/ */
autofocus?: boolean; autofocus?: boolean;
/** /**
@ -42,7 +42,7 @@ export declare class RadioProps {
export declare class Radio extends AntdComponent { export declare class Radio extends AntdComponent {
static Group: typeof RadioGroup; static Group: typeof RadioGroup;
static Button: typeof RadioButton; static Button: typeof RadioButton;
$props: RadioProps $props: RadioProps;
/** /**
* remove focus * remove focus
*/ */

11
types/rate.d.ts vendored
View File

@ -7,10 +7,10 @@ import { VNodeChild } from 'vue';
export declare class Rate extends AntdComponent { export declare class Rate extends AntdComponent {
$props: { $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;
/** /**
@ -62,8 +62,7 @@ export declare class Rate extends AntdComponent {
value?: number; value?: number;
tooltips?: Array<string>; tooltips?: Array<string>;
};
}
/** /**
* remove focus * remove focus
*/ */

View File

@ -8,9 +8,9 @@ import { VNodeChild } from 'vue';
export declare class OptionGroup extends AntdComponent { export declare class OptionGroup extends AntdComponent {
$props: { $props: {
/** /**
* Key * Key
* @type string * @type string
*/ */
key?: string; key?: string;
/** /**
@ -18,6 +18,5 @@ export declare class OptionGroup extends AntdComponent {
* @type any (string | slot) * @type any (string | slot)
*/ */
label?: VNodeChild | JSX.Element; label?: VNodeChild | JSX.Element;
} };
} }

View File

@ -7,10 +7,10 @@ import { AntdComponent } from '../component';
export declare class Option extends AntdComponent { export declare class Option extends AntdComponent {
$props: { $props: {
/** /**
* Disable this option * Disable this option
* @default false * @default false
* @type boolean * @type boolean
*/ */
disabled?: boolean; disabled?: boolean;
/** /**
@ -36,6 +36,5 @@ export declare class Option extends AntdComponent {
* @type string * @type string
*/ */
class?: string; class?: string;
} };
} }

7
types/slider.d.ts vendored
View File

@ -48,10 +48,7 @@ export declare class Slider extends AntdComponent {
* @type object * @type object
*/ */
marks?: { marks?: {
[key: number]: string [key: number]: string | VNodeChild | { style: object; label: string | VNodeChild } | Function;
| VNodeChild
| { style: object; label: string | VNodeChild }
| Function;
}; };
/** /**
@ -133,7 +130,7 @@ export declare class Slider extends AntdComponent {
* @param value * @param value
*/ */
onChange?: (value?: any) => void; onChange?: (value?: any) => void;
} };
/** /**
* remove focus * remove focus

View File

@ -6,7 +6,7 @@ import { AntdComponent } from '../component';
import { VNodeChild, CSSProperties } from 'vue'; import { VNodeChild, CSSProperties } from 'vue';
export declare class StatisticCountdown extends AntdComponent { export declare class StatisticCountdown extends AntdComponent {
$props:{ $props: {
/** /**
* Format as moment * Format as moment
* @default 'HH:mm:ss' * @default 'HH:mm:ss'
@ -39,5 +39,5 @@ export declare class StatisticCountdown extends AntdComponent {
* Set value css style * Set value css style
*/ */
valueStyle?: CSSProperties; valueStyle?: CSSProperties;
} };
} }

View File

@ -10,10 +10,10 @@ export declare class Statistic extends AntdComponent {
static Countdown: typeof StatisticCountdown; static Countdown: typeof StatisticCountdown;
$props: { $props: {
/** /**
* decimal separator * decimal separator
* @default '.' * @default '.'
* @type string * @type string
*/ */
decimalSeparator?: string; decimalSeparator?: string;
/** /**
@ -58,5 +58,5 @@ export declare class Statistic extends AntdComponent {
* @type string or number * @type string or number
*/ */
value?: string | number; value?: string | number;
} };
} }

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

@ -3,13 +3,13 @@
// 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'; import { VNodeChild } from 'vue';
export declare class Step extends AntdComponent { export declare class Step extends AntdComponent {
$props: { $props: {
/** /**
* description of the step, optional property * description of the step, optional property
* @type any (string | slot) * @type any (string | slot)
*/ */
description?: VNodeChild | JSX.Element; description?: VNodeChild | JSX.Element;
/** /**
@ -32,5 +32,5 @@ export declare class Step extends AntdComponent {
title?: VNodeChild | JSX.Element; title?: VNodeChild | JSX.Element;
disabled?: boolean; disabled?: boolean;
subTitle?: VNodeChild | JSX.Element; subTitle?: VNodeChild | JSX.Element;
} };
} }

View File

@ -57,5 +57,5 @@ export declare class Steps extends AntdComponent {
* @type boolean | Funtion * @type boolean | Funtion
*/ */
progressDot?: boolean | Function; progressDot?: boolean | Function;
} };
} }

11
types/switch.d.ts vendored
View File

@ -7,10 +7,10 @@ import { VNodeChild } from 'vue';
export declare class Switch extends AntdComponent { export declare class Switch extends AntdComponent {
$props: { $props: {
/** /**
* get focus when component mounted * get focus when component mounted
* @default false * @default false
* @type boolean * @type boolean
*/ */
autofocus?: boolean; autofocus?: boolean;
/** /**
@ -59,8 +59,7 @@ export declare class Switch extends AntdComponent {
* @type any (string | slot) * @type any (string | slot)
*/ */
unCheckedChildren?: VNodeChild | JSX.Element; unCheckedChildren?: VNodeChild | JSX.Element;
};
}
/** /**
* remove focus * remove focus
*/ */

View File

@ -25,5 +25,5 @@ export declare class TabPane extends AntdComponent {
* @type any (string | slot) * @type any (string | slot)
*/ */
tab?: VNodeChild | JSX.Element; tab?: VNodeChild | JSX.Element;
} };
} }

View File

@ -73,5 +73,5 @@ export declare class Tabs extends AntdComponent {
* @type number * @type number
*/ */
tabBarGutter?: number; tabBarGutter?: number;
} };
} }

View File

@ -207,7 +207,7 @@ export declare class TimePicker extends AntdComponent {
* @param open * @param open
*/ */
onOpenChange?: (open?: boolean) => void; onOpenChange?: (open?: boolean) => void;
} };
/** /**
* remove focus * remove focus

View File

@ -6,12 +6,12 @@ import { VNodeChild } from 'vue';
import { AntdComponent } from '../component'; import { AntdComponent } from '../component';
export declare class TimelineItem extends AntdComponent { export declare class TimelineItem extends AntdComponent {
$props:{ $props: {
/** /**
* Set the circle's color to blue, red, green or other custom colors * Set the circle's color to blue, red, green or other custom colors
* @default 'blue' * @default 'blue'
* @type string * @type string
*/ */
color?: string; color?: string;
/** /**
@ -19,6 +19,5 @@ export declare class TimelineItem extends AntdComponent {
* @type any (string | slot) * @type any (string | slot)
*/ */
dot?: VNodeChild | JSX.Element; dot?: VNodeChild | JSX.Element;
};
}
} }

View File

@ -9,7 +9,7 @@ import { TimelineItem } from './timeline-item';
export declare class Timeline extends AntdComponent { export declare class Timeline extends AntdComponent {
static Item: typeof TimelineItem; static Item: typeof TimelineItem;
$props:{ $props: {
/** /**
* Set the last ghost node's existence or its content * Set the last ghost node's existence or its content
* @default false * @default false
@ -37,5 +37,5 @@ export declare class Timeline extends AntdComponent {
* @type string * @type string
*/ */
mode?: 'left' | 'alternate' | 'right'; mode?: 'left' | 'alternate' | 'right';
} };
} }

View File

@ -7,67 +7,67 @@ export declare type triggerType = 'hover' | 'focus' | 'click' | 'contextmenu';
export declare class TooltipCommon { export declare class TooltipCommon {
// $props: { // $props: {
/** /**
* Whether the arrow is pointed at the center of target * Whether the arrow is pointed at the center of target
* @default false * @default false
* @type boolean * @type boolean
*/ */
arrowPointAtCenter?: boolean; arrowPointAtCenter?: boolean;
/** /**
* Whether to adjust popup placement automatically when popup is off screen * Whether to adjust popup placement automatically when popup is off screen
* @default true * @default true
* @type boolean * @type boolean
*/ */
autoAdjustOverflow?: boolean | object; autoAdjustOverflow?: boolean | object;
/** /**
* Whether the floating tooltip card is visible by default * Whether the floating tooltip card is visible by default
* @default false * @default false
* @type boolean * @type boolean
*/ */
defaultVisible?: boolean; defaultVisible?: boolean;
/** /**
* The DOM container of the tip, the default behavior is to create a div element in body. * The DOM container of the tip, the default behavior is to create a div element in body.
* @default () => document.body * @default () => document.body
* @type Function * @type Function
*/ */
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement; getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
/** /**
* Delay in seconds, before tooltip is shown on mouse enter * Delay in seconds, before tooltip is shown on mouse enter
* @default 0 * @default 0
* @type number * @type number
*/ */
mouseEnterDelay?: number; mouseEnterDelay?: number;
/** /**
* Delay in seconds, before tooltip is hidden on mouse leave * Delay in seconds, before tooltip is hidden on mouse leave
* @default 0.1 * @default 0.1
* @type number * @type number
*/ */
mouseLeaveDelay?: number; mouseLeaveDelay?: number;
/** /**
* Class name of the tooltip card * Class name of the tooltip card
* @type string * @type string
*/ */
overlayClassName?: string; overlayClassName?: string;
/** /**
* Style of the tooltip card * Style of the tooltip card
* @type undefined * @type undefined
*/ */
overlayStyle?: CSSProperties; overlayStyle?: CSSProperties;
/** /**
* The position of the tooltip relative to the target, which can be one of top * The position of the tooltip relative to the target, which can be one of top
* left right bottom topLeft topRight bottomLeft bottomRight leftTop leftBottom rightTop rightBottom * left right bottom topLeft topRight bottomLeft bottomRight leftTop leftBottom rightTop rightBottom
* @default 'top' * @default 'top'
* @type string * @type string
*/ */
placement?: placement?:
| 'top' | 'top'
| 'left' | 'left'
| 'right' | 'right'
@ -81,31 +81,31 @@ export declare class TooltipCommon {
| 'rightTop' | 'rightTop'
| 'rightBottom'; | 'rightBottom';
/** /**
* Tooltip trigger mode * Tooltip trigger mode
* @default 'hover' * @default 'hover'
* @type triggerType | triggerType[] * @type triggerType | triggerType[]
*/ */
trigger?: triggerType | triggerType[]; trigger?: triggerType | triggerType[];
/** /**
* Whether the floating tooltip card is visible or not * Whether the floating tooltip card is visible or not
* @default false * @default false
* @type boolean * @type boolean
*/ */
visible?: boolean; visible?: boolean;
/** /**
* Whether to destroy tooltip on hide * Whether to destroy tooltip on hide
* @default false * @default false
* @type boolean * @type boolean
*/ */
destroyTooltipOnHide?: boolean; destroyTooltipOnHide?: boolean;
/** /**
* this value will be merged into placement's config, please refer to the settings dom-align * this value will be merged into placement's config, please refer to the settings dom-align
* @type object * @type object
*/ */
align?: unknown; align?: unknown;
// } // }
} }