import React from "react"; import { InputProps, InputRef } from "antd/es/input"; type InputType = "default" | "icon-only"; interface BaseInputProps { /** 交互类型 */ performance?: InputType; /** 带标签的 input,设置后置标签 */ addonAfter?: React.ReactNode; /** 带标签的 input,设置前置标签 */ addonBefore?: React.ReactNode; /** 可以点击清除图标删除内容 */ allowClear?: boolean | { clearIcon: React.ReactNode; }; /** 是否有边框 */ bordered?: boolean; /** 输入框默认内容 */ defaultValue?: string; /** 是否禁用状态,默认为 false */ disabled?: boolean; /** 输入框的 id */ id?: string; /** 最大长度 */ maxLength?: number; /** 是否展示字数 */ showCount?: boolean | { formatter: (props: { count: number; maxLength?: number; }) => React.ReactNode; }; /** 带有前缀图标的 input */ prefix?: React.ReactNode; /** 带有后缀图标的 input */ suffix?: React.ReactNode; /** 输入框内容 */ value?: string | ReadonlyArray | number | undefined; /** 输入框内容变化时的回调 */ onChange?: (e: React.ChangeEvent) => void; /** 按下回车的回调 */ onPressEnter?: (e: React.KeyboardEvent) => void; /** 取消焦点 */ blur?: () => void; /** 获取焦点 */ focus?: (option?: { preventScroll?: boolean; cursor?: "start" | "end" | "all"; }) => void; } export type FRCInputProps = BaseInputProps & InputProps; export type { InputRef }; export declare const Input: React.ForwardRefExoticComponent>; export default Input;