import * as React from "react"; import { Omit } from "../Utils/type"; import { ConfigConsumerProps } from "../Config"; import TextArea from './TextArea'; interface IInputProps extends Omit, "size" | "prefix"> { /** * 输入框大小 * * @default 'default' **/ size?: "large" | "default" | "small"; /** * 前置元素 * * @default '' **/ addBefore?: React.ReactNode; /** * 后置元素 * * @default '' **/ addAfter?: React.ReactNode; /** * 自定义组件类名 * * @default '' **/ className?: string; /** * 是否带字符限制 * * @default false **/ hasCount?: boolean; /** * 是否带删除功能 * * @default false **/ hasClear?: boolean; /** * 是否带搜索按钮,该属性会与 addon 冲突 * * @default false **/ hasSearch?: boolean; /** * 搜索按钮样式,该属性会与 addon 冲突 * * @default false **/ searchButton?: boolean | React.ReactNode; /** * 默认前缀 * * @default 'lg' **/ prefixCls?: string; /** * 自定义组件样式 * * @default **/ style?: React.CSSProperties; /** * 默认内容 * * @default '' **/ defaultValue?: string; } declare class Input extends React.Component { static TextArea: typeof TextArea; static defaultProps: { className: string; hasCount: boolean; hasClear: boolean; size: string; type: string; hasSearch: boolean; searchButton: boolean; }; componentWillReceiveProps(nextProps: any): void; input: HTMLInputElement; constructor(props: IInputProps); focus(): void; saveInput: (node: HTMLInputElement) => void; setValue: (value: string, e: React.ChangeEvent | React.MouseEvent, callback?: (() => void) | undefined) => void; handleChange: (e: React.ChangeEvent) => void; handleReset: (e: React.MouseEvent) => void; renderClearIcon: (prefixCls: string) => JSX.Element | null; renderInput: ({ getPrefixCls }: ConfigConsumerProps) => JSX.Element; render(): JSX.Element; } export default Input;