InputNumber.d.ts
2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/// <reference types="node" />
import React from 'react';
import { InputNumberProps, InputNumberState } from './interface';
declare function noop(): void;
declare class InputNumber extends React.Component<Partial<InputNumberProps>, InputNumberState> {
static defaultProps: {
focusOnUpDown: boolean;
useTouch: boolean;
prefixCls: string;
max: number;
min: number;
step: number;
style: {};
onChange: typeof noop;
onKeyDown: typeof noop;
onPressEnter: typeof noop;
onFocus: typeof noop;
onBlur: typeof noop;
parser: (input: string) => string;
required: boolean;
autoComplete: string;
};
pressingUpOrDown: boolean;
inputting: boolean;
rawInput: any;
cursorStart: number;
cursorAfter: number | string;
input: HTMLInputElement;
lastKeyCode: any;
currentValue: number | string;
cursorEnd: number;
cursorBefore: string;
autoStepTimer: NodeJS.Timer;
constructor(props: InputNumberProps);
componentDidMount(): void;
componentDidUpdate(prevProps: any): void;
componentWillUnmount(): void;
onKeyDown: (e: any, ...args: any[]) => void;
onKeyUp: (e: any, ...args: any[]) => void;
onChange: (e: any) => void;
onMouseUp: (...args: any[]) => void;
onFocus: (...args: any[]) => void;
onBlur: (...args: any[]) => void;
getCurrentValidValue(value: any): any;
getRatio: (e: any) => number;
getValueFromEvent(e: any): any;
getValidValue(value: any, min?: number, max?: number): any;
setValue(v: any, callback: any): number;
getFullNum: (num: any) => any;
getPrecision: (value: any) => number;
getMaxPrecision(currentValue: any, ratio?: number): number;
getPrecisionFactor(currentValue: any, ratio?: number): number;
getInputDisplayValue: (state: any) => any;
recordCursorPosition: () => void;
restoreByAfter: (str: any) => boolean;
partRestoreByAfter: (str: any) => any;
focus(): void;
blur(): void;
select(): void;
formatWrapper(num: any): any;
toPrecisionAsStep(num: any): any;
isNotCompleteNumber: (num: any) => boolean;
toNumber(num: any): any;
upStep(val: any, rat: any): any;
downStep(val: any, rat: any): any;
step(type: any, e: any, ratio: number, recursive: any): void;
stop: () => void;
down: (e: any, ratio: any, recursive: any) => void;
up: (e: any, ratio: any, recursive: any) => void;
saveInput: (node: any) => void;
fixCaret(start: any, end: any): void;
render(): JSX.Element;
}
export default InputNumber;