chore: update type message (#2718)
* chore: update type message * chore: update type input-numberpull/2720/head^2
parent
23f6116610
commit
45562123d4
|
@ -5,81 +5,83 @@
|
||||||
import { AntdComponent } from './component';
|
import { AntdComponent } from './component';
|
||||||
|
|
||||||
export declare class InputNumber extends AntdComponent {
|
export declare class InputNumber extends AntdComponent {
|
||||||
/**
|
$props: {
|
||||||
* get focus when component mounted
|
/**
|
||||||
* @default false
|
* get focus when component mounted
|
||||||
* @type boolean
|
* @default false
|
||||||
*/
|
* @type boolean
|
||||||
autofocus: boolean;
|
*/
|
||||||
|
autofocus?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* initial value
|
* initial value
|
||||||
* @type number | string
|
* @type number | string
|
||||||
*/
|
*/
|
||||||
defaultValue: number | string;
|
defaultValue?: number | string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* disable the input
|
* disable the input
|
||||||
* @default false
|
* @default false
|
||||||
* @type boolean
|
* @type boolean
|
||||||
*/
|
*/
|
||||||
disabled: boolean;
|
disabled?: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies the format of the value presented
|
* Specifies the format of the value presented
|
||||||
* @type Function
|
* @type Function
|
||||||
*/
|
*/
|
||||||
formatter: (value: number | string) => string;
|
formatter?: (value: number | string) => string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* max value
|
* max value
|
||||||
* @default Infinity
|
* @default Infinity
|
||||||
* @type number
|
* @type number
|
||||||
*/
|
*/
|
||||||
max: number;
|
max?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* mix value
|
* mix value
|
||||||
* @default Infinity
|
* @default -Infinity
|
||||||
* @type number
|
* @type number
|
||||||
*/
|
*/
|
||||||
min: number;
|
min?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies the value extracted from formatter
|
* Specifies the value extracted from formatter
|
||||||
* @type Function
|
* @type Function
|
||||||
*/
|
*/
|
||||||
parser: (string: string) => number;
|
parser?: (string: string) => number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* precision of input value
|
* precision of input value
|
||||||
* @type number
|
* @type number
|
||||||
*/
|
*/
|
||||||
precision: number;
|
precision?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* decimal separator
|
* decimal separator
|
||||||
* @type string
|
* @type string
|
||||||
*/
|
*/
|
||||||
decimalSeparator: string;
|
decimalSeparator?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* width of input box
|
* width of input box
|
||||||
* @default 'default'
|
* @default 'default'
|
||||||
* @type string
|
* @type string
|
||||||
*/
|
*/
|
||||||
size: 'large' | 'small' | 'default';
|
size?: 'large' | 'small' | 'default';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number to which the current value is increased or decreased. It can be an integer or decimal.
|
* The number to which the current value is increased or decreased. It can be an integer or decimal.
|
||||||
* @default 1
|
* @default 1
|
||||||
* @type number | string
|
* @type number | string
|
||||||
*/
|
*/
|
||||||
step: number | string;
|
step?: number | string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* current value
|
* current value
|
||||||
* @type number | string
|
* @type number | string
|
||||||
*/
|
*/
|
||||||
value: number | string;
|
value?: number | string;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// 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 { VNode, CreateElement } from 'vue';
|
import { VNodeChild } from 'vue';
|
||||||
|
|
||||||
export interface ThenableArgument {
|
export interface ThenableArgument {
|
||||||
(val: any): void;
|
(val: any): void;
|
||||||
|
@ -12,7 +12,7 @@ export interface MessageType {
|
||||||
then: (fill: ThenableArgument, reject: ThenableArgument) => Promise<void>;
|
then: (fill: ThenableArgument, reject: ThenableArgument) => Promise<void>;
|
||||||
promise: Promise<void>;
|
promise: Promise<void>;
|
||||||
}
|
}
|
||||||
export type ConfigType = VNode | ((h: CreateElement) => VNode);
|
export type ConfigType = VNodeChild | (() => VNodeChild);
|
||||||
export type ConfigDuration = number | (() => void);
|
export type ConfigDuration = number | (() => void);
|
||||||
export type ConfigOnClose = () => void;
|
export type ConfigOnClose = () => void;
|
||||||
|
|
||||||
|
@ -47,6 +47,9 @@ export interface MessageOptions {
|
||||||
* @type Function
|
* @type Function
|
||||||
*/
|
*/
|
||||||
onClose?: ConfigOnClose;
|
onClose?: ConfigOnClose;
|
||||||
|
/**
|
||||||
|
* The unique identifier of the Message
|
||||||
|
*/
|
||||||
key?: string | number;
|
key?: string | number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,9 +99,3 @@ export declare interface Message {
|
||||||
config: (options: MessageConfigOptions) => void;
|
config: (options: MessageConfigOptions) => void;
|
||||||
destroy: () => void;
|
destroy: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module 'vue/types/vue' {
|
|
||||||
interface Vue {
|
|
||||||
$message: Message;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue