fix: slider, time-picker typo (#2726)
parent
941ebc2b66
commit
63e87471d6
|
@ -3,108 +3,137 @@
|
|||
// Definitions: https://github.com/vueComponent/ant-design-vue/types
|
||||
|
||||
import { AntdComponent } from './component';
|
||||
import { VNode } from 'vue';
|
||||
import { VNodeChild } from 'vue';
|
||||
|
||||
export declare class Slider extends AntdComponent {
|
||||
/**
|
||||
* get focus when component mounted
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
autofocus: boolean;
|
||||
$props: {
|
||||
/**
|
||||
* get focus when component mounted
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
autofocus?: boolean;
|
||||
|
||||
/**
|
||||
* The default value of slider. When range is false, use number, otherwise, use [number, number]
|
||||
* @default 0 | [0, 0]
|
||||
* @type number | number[]
|
||||
*/
|
||||
defaultValue: number | number[];
|
||||
/**
|
||||
* The default value of slider. When range is false, use number, otherwise, use [number, number]
|
||||
* @default 0 | [0, 0]
|
||||
* @type number | number[]
|
||||
*/
|
||||
defaultValue?: number | number[];
|
||||
|
||||
/**
|
||||
* If true, the slider will not be interactable.
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
disabled: boolean;
|
||||
/**
|
||||
* If true, the slider will not be interactable.
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* Whether the thumb can drag over tick only.
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
dots: boolean;
|
||||
/**
|
||||
* Whether the thumb can drag over tick only.
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
dots?: boolean;
|
||||
|
||||
/**
|
||||
* Make effect when marks not null,true means containment and false means coordinative
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
included: boolean;
|
||||
/**
|
||||
* Make effect when marks not null,true means containment and false means coordinative
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
included?: boolean;
|
||||
|
||||
/**
|
||||
* Tick mark of Slider, type of key must be number, and must in closed interval [min, max] ,each mark can declare its own style.
|
||||
* @default { number: string|VNode } | { number: { style: object, label: string|VNode } } | { number: () => VNode }
|
||||
* @type object
|
||||
*/
|
||||
marks: {
|
||||
[key: number]: string | VNode | { style: object; label: string | VNode } | Function;
|
||||
};
|
||||
/**
|
||||
* Tick mark of Slider, type of key must be number, and must in closed interval [min, max] ,each mark can declare its own style.
|
||||
* @default { number: string|VNode } | { number: { style: object, label: string|VNode } } | { number: () => VNode }
|
||||
* @type object
|
||||
*/
|
||||
marks?: {
|
||||
[key: number]: string
|
||||
| VNodeChild
|
||||
| { style: object; label: string | VNodeChild }
|
||||
| Function;
|
||||
};
|
||||
|
||||
/**
|
||||
* The maximum value the slider can slide to
|
||||
* @default 100
|
||||
* @type number
|
||||
*/
|
||||
max: number;
|
||||
/**
|
||||
* The maximum value the slider can slide to
|
||||
* @default 100
|
||||
* @type number
|
||||
*/
|
||||
max?: number;
|
||||
|
||||
/**
|
||||
* The minimum value the slider can slide to.
|
||||
* @default 0
|
||||
* @type number
|
||||
*/
|
||||
min: number;
|
||||
/**
|
||||
* The minimum value the slider can slide to.
|
||||
* @default 0
|
||||
* @type number
|
||||
*/
|
||||
min?: number;
|
||||
|
||||
/**
|
||||
* dual thumb mode
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
range: boolean;
|
||||
/**
|
||||
* dual thumb mode
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
range?: boolean;
|
||||
|
||||
/**
|
||||
* The granularity the slider can step through values.
|
||||
* Must greater than 0, and be divided by (max - min) . When marks no null, step can be null.
|
||||
* @default 1
|
||||
* @type number | null
|
||||
*/
|
||||
step: number | null;
|
||||
/**
|
||||
* The granularity the slider can step through values.
|
||||
* Must greater than 0, and be divided by (max - min) . When marks no null, step can be null.
|
||||
* @default 1
|
||||
* @type number | null
|
||||
*/
|
||||
step?: number | null;
|
||||
|
||||
/**
|
||||
* Slider will pass its value to tipFormatter, and display its value in Tooltip, and hide Tooltip when return value is null.
|
||||
* @default IDENTITY
|
||||
* @type Function | null
|
||||
*/
|
||||
tipFormatter: Function | null;
|
||||
/**
|
||||
* Slider will pass its value to tipFormatter, and display its value in Tooltip, and hide Tooltip when return value is null.
|
||||
* @default IDENTITY
|
||||
* @type Function | null
|
||||
*/
|
||||
tipFormatter?: Function | null;
|
||||
|
||||
/**
|
||||
* The value of slider. When range is false, use number, otherwise, use [number, number]
|
||||
* @type number | number[]
|
||||
*/
|
||||
value: number | number[];
|
||||
/**
|
||||
* The value of slider. When range is false, use number, otherwise, use [number, number]
|
||||
* @type number | number[]
|
||||
*/
|
||||
value?: number | number[];
|
||||
|
||||
/**
|
||||
* If true, the slider will be vertical.
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
vertical: boolean;
|
||||
/**
|
||||
* If true, the slider will be vertical.
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
vertical?: boolean;
|
||||
|
||||
/**
|
||||
* If true, Tooltip will show always, or it will not show anyway, even if dragging or hovering.
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
tooltipVisible: boolean;
|
||||
/**
|
||||
* If true, Tooltip will show always, or it will not show anyway, even if dragging or hovering.
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
tooltipVisible?: boolean;
|
||||
|
||||
/**
|
||||
* Set Tooltip display position. Ref Tooltip
|
||||
* @see https://antdv.com/components/tooltip/
|
||||
*/
|
||||
tooltipPlacement?: string;
|
||||
|
||||
/**
|
||||
* The DOM container of the Tooltip,
|
||||
* the default behavior is to create a div element in body.
|
||||
*/
|
||||
getTooltipPopupContainer?: Function;
|
||||
|
||||
/**
|
||||
* Fire when mouseup is fired.
|
||||
* @param value
|
||||
*/
|
||||
onAfterChange?: (value?: any) => void;
|
||||
|
||||
/**
|
||||
* Callback function that is fired when the user changes the slider's value.
|
||||
* @param value
|
||||
*/
|
||||
onChange?: (value?: any) => void;
|
||||
}
|
||||
|
||||
/**
|
||||
* remove focus
|
||||
|
|
|
@ -4,168 +4,210 @@
|
|||
|
||||
import { AntdComponent } from './component';
|
||||
import { Moment } from 'moment';
|
||||
import { VNodeChild } from 'vue';
|
||||
|
||||
export declare class TimePicker extends AntdComponent {
|
||||
/**
|
||||
* some addon to timepicker panel bottom
|
||||
* @type any (slot | slot-scope)
|
||||
*/
|
||||
addon: any;
|
||||
$props: {
|
||||
/**
|
||||
* some addon to timepicker panel bottom
|
||||
* @type any (slot | slot-scope)
|
||||
*/
|
||||
addon?: VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* allow clearing text
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
allowClear: boolean;
|
||||
/**
|
||||
* allow clearing text
|
||||
* @default true
|
||||
* @type boolean
|
||||
*/
|
||||
allowClear?: boolean;
|
||||
|
||||
/**
|
||||
* get focus when component mounted
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
autofocus: boolean;
|
||||
/**
|
||||
* get focus when component mounted
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
autofocus?: boolean;
|
||||
|
||||
/**
|
||||
* clear tooltip of icon
|
||||
* @default 'clear'
|
||||
* @type string
|
||||
*/
|
||||
clearText: string;
|
||||
/**
|
||||
* clear tooltip of icon
|
||||
* @default 'clear'
|
||||
* @type string
|
||||
*/
|
||||
clearText?: string;
|
||||
|
||||
/**
|
||||
* default open panel value, used to set utcOffset,locale if value/defaultValue absent
|
||||
* @default Moment
|
||||
* @type Moment
|
||||
*/
|
||||
defaultOpenValue: Moment;
|
||||
/**
|
||||
* default open panel value, used to set utcOffset,locale if value/defaultValue absent
|
||||
* @default Moment
|
||||
* @type Moment
|
||||
*/
|
||||
defaultOpenValue?: Moment;
|
||||
|
||||
/**
|
||||
* to set default time
|
||||
* @type Moment
|
||||
*/
|
||||
defaultValue: Moment | string;
|
||||
/**
|
||||
* to set default time
|
||||
* @type Moment
|
||||
*/
|
||||
defaultValue?: Moment | string;
|
||||
|
||||
/**
|
||||
* determine whether the TimePicker is disabled
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
disabled: boolean;
|
||||
/**
|
||||
* determine whether the TimePicker is disabled
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/**
|
||||
* to specify the hours that cannot be selected
|
||||
* @type Function
|
||||
*/
|
||||
disabledHours: () => any;
|
||||
/**
|
||||
* to specify the hours that cannot be selected
|
||||
* @type Function
|
||||
*/
|
||||
disabledHours?: () => any;
|
||||
|
||||
/**
|
||||
* to specify the minutes that cannot be selected
|
||||
* @type Function
|
||||
*/
|
||||
disabledMinutes: (selectedHour: any) => any;
|
||||
/**
|
||||
* to specify the minutes that cannot be selected
|
||||
* @type Function
|
||||
*/
|
||||
disabledMinutes?: (selectedHour?: any) => any;
|
||||
|
||||
/**
|
||||
* to specify the seconds that cannot be selected
|
||||
* @type Function
|
||||
*/
|
||||
disabledSeconds: (selectedHour: any, selectedMinute: any) => any;
|
||||
/**
|
||||
* to specify the seconds that cannot be selected
|
||||
* @type Function
|
||||
*/
|
||||
disabledSeconds?: (selectedHour?: any, selectedMinute?: any) => any;
|
||||
|
||||
/**
|
||||
* to set the time format
|
||||
* @default "HH:mm:ss"
|
||||
* @type string
|
||||
*/
|
||||
format: string;
|
||||
/**
|
||||
* to set the time format
|
||||
* @default "HH:mm:ss"
|
||||
* @type string
|
||||
*/
|
||||
format?: string;
|
||||
|
||||
/**
|
||||
* to set the container of the floating layer, while the default is to create a div element in body
|
||||
* @type Function
|
||||
*/
|
||||
getPopupContainer: (trigger: any) => any;
|
||||
/**
|
||||
* to set the container of the floating layer, while the default is to create a div element in body
|
||||
* @type Function
|
||||
*/
|
||||
getPopupContainer?: (trigger?: any) => any;
|
||||
|
||||
/**
|
||||
* hide the options that can not be selected
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
hideDisabledOptions: boolean;
|
||||
/**
|
||||
* hide the options that can not be selected
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
hideDisabledOptions?: boolean;
|
||||
|
||||
/**
|
||||
* interval between hours in picker
|
||||
* @default 1
|
||||
* @type number
|
||||
*/
|
||||
hourStep: number;
|
||||
/**
|
||||
* interval between hours in picker
|
||||
* @default 1
|
||||
* @type number
|
||||
*/
|
||||
hourStep?: number;
|
||||
|
||||
/**
|
||||
* Set the readonly attribute of the input tag (avoids virtual keyboard on touch devices)
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
inputReadOnly: boolean;
|
||||
/**
|
||||
* Set the readonly attribute of the input tag (avoids virtual keyboard on touch devices)
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
inputReadOnly?: boolean;
|
||||
|
||||
/**
|
||||
* interval between minutes in picker
|
||||
* @default 1
|
||||
* @type number
|
||||
*/
|
||||
minuteStep: number;
|
||||
/**
|
||||
* interval between minutes in picker
|
||||
* @default 1
|
||||
* @type number
|
||||
*/
|
||||
minuteStep?: number;
|
||||
|
||||
/**
|
||||
* whether to popup panel
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
open: boolean;
|
||||
/**
|
||||
* whether to popup panel
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
open?: boolean;
|
||||
|
||||
/**
|
||||
* display when there's no value
|
||||
* @default "Select a time"
|
||||
* @type string
|
||||
*/
|
||||
placeholder: string;
|
||||
/**
|
||||
* display when there's no value
|
||||
* @default "Select a time"
|
||||
* @type string
|
||||
*/
|
||||
placeholder?: string;
|
||||
|
||||
/**
|
||||
* className of panel
|
||||
* @type string
|
||||
*/
|
||||
popupClassName: string;
|
||||
/**
|
||||
* className of panel
|
||||
* @type string
|
||||
*/
|
||||
popupClassName?: string;
|
||||
|
||||
popupStyle: object;
|
||||
/**
|
||||
* style of panel
|
||||
*/
|
||||
popupStyle?: object;
|
||||
|
||||
/**
|
||||
* interval between seconds in picker
|
||||
* @default 1
|
||||
* @type number
|
||||
*/
|
||||
secondStep: number;
|
||||
/**
|
||||
* interval between seconds in picker
|
||||
* @default 1
|
||||
* @type number
|
||||
*/
|
||||
secondStep?: number;
|
||||
|
||||
/**
|
||||
* The custom suffix icon
|
||||
* @type any (string | VNode | slot)
|
||||
*/
|
||||
suffixIcon: any;
|
||||
/**
|
||||
* The custom suffix icon
|
||||
* @type any (string | VNode | slot)
|
||||
*/
|
||||
suffixIcon?: string | VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* display as 12 hours format, with default format h:mm:ss a
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
use12Hours: boolean;
|
||||
/**
|
||||
* The custom clear icon
|
||||
* @type string | VNodeChild | JSX.Element
|
||||
* @version 1.5.0
|
||||
*/
|
||||
clearIcon?: string | VNodeChild | JSX.Element;
|
||||
|
||||
/**
|
||||
* to set time
|
||||
* @type Moment
|
||||
*/
|
||||
value: Moment | string;
|
||||
/**
|
||||
* display as 12 hours format, with default format h:mm:ss a
|
||||
* @default false
|
||||
* @type boolean
|
||||
*/
|
||||
use12Hours?: boolean;
|
||||
|
||||
/**
|
||||
* Time picker size
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
size: 'large' | 'default' | 'small';
|
||||
/**
|
||||
* to set time
|
||||
* @type Moment
|
||||
*/
|
||||
value?: Moment | string;
|
||||
|
||||
/**
|
||||
* Time picker size
|
||||
* @default 'default'
|
||||
* @type string
|
||||
*/
|
||||
size?: 'large' | 'default' | 'small';
|
||||
|
||||
/**
|
||||
* this value will be merged into placement's config,
|
||||
* please refer to the settings dom-align
|
||||
* @see https://github.com/yiminghe/dom-align
|
||||
* @version 1.5.4
|
||||
*/
|
||||
align?: object;
|
||||
|
||||
/**
|
||||
* optional, format of binding value. If not specified,
|
||||
* the binding value will be a Date object
|
||||
* @see https://momentjs.com/docs/#/displaying/format/
|
||||
* @version 1.5.4
|
||||
*/
|
||||
valueFormat?: any;
|
||||
|
||||
/**
|
||||
* a callback function, can be executed when the selected time is changing
|
||||
* @param time
|
||||
* @param timeString
|
||||
*/
|
||||
onChange?: (time?: Moment | string, timeString?: string) => void;
|
||||
|
||||
/**
|
||||
* a callback function which will be called while panel opening/closing
|
||||
* @param open
|
||||
*/
|
||||
onOpenChange?: (open?: boolean) => void;
|
||||
}
|
||||
|
||||
/**
|
||||
* remove focus
|
||||
|
|
Loading…
Reference in New Issue