import { InputProps } from 'antd/lib/input'; import React, { ReactNode } from 'react'; import { NumberFormatProps } from 'react-number-format'; /** 自定义输入框,本来用Input即可,但prefix和suffix这两个属性与NumberFormat相冲突 */ interface AntInputNodeProps extends InputProps { antPrefix: ReactNode; antSuffix: ReactNode; } /** 数字输入框 */ export interface InputNumberProps extends Omit { value?: number | string; /** 受控属性 */ defaultValue?: number | string; /** 默认value */ max?: number; /** 限制最大范围 */ min?: number; /** 最小范围 */ precision?: number; /** 小数位数 */ rangBorder?: 0 | 1; /** 当输入均不在最大及最小范围内时,默认取值偏向哪边,0 -> min, 1 -> max */ thousandSeparator?: boolean; /** 是否千分符分割 */ format?: NumberFormatProps['format']; /** 格式化 */ onChange?: (value: string) => void; /** value改变时触发 */ onBlur?: (value: string) => void; /** input失去焦点时触发 */ [key: string]: any; } export declare const InputNumber: React.ForwardRefExoticComponent & React.RefAttributes<((el: HTMLInputElement) => void) | ((instance: any) => void) | React.RefObject | null | undefined>>; export {};