import React from 'react'; import { NativeProps } from 'antd-mobile/es/utils/native-props'; import { LicenseKeyBoardProps } from '../license-key-board'; type NativeInputProps = React.DetailedHTMLProps, HTMLInputElement>; export type InputLicenseKeyBoardProps = Pick & { /** 受控值(优先于 defaultValue) */ value?: string; /** 非受控初始值 */ defaultValue?: string; /** 值变化回调 */ onChange?: (val: string) => void; /** 占位提示文案 */ placeholder?: string; /** 是否禁用(禁用后不弹出键盘) */ disabled?: boolean; /** 是否显示清除按钮(有值时显示清除图标) */ clearable?: boolean; /** 点击清除按钮时触发 */ onClear?: () => void; /** input 的 id(常用于与 label 关联) */ id?: string; /** 回车键按下事件(兼容性依赖运行环境) */ onEnterPress?: (e: React.KeyboardEvent) => void; /** 虚拟键盘 Enter 键提示内容 */ enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'; } & /** 车牌键盘的配置透传(标题、确认文字、安全区等) */ LicenseKeyBoardProps & /** 支持的 CSS 变量:字号、文字颜色、占位符颜色、文字对齐 */ NativeProps<'--font-size' | '--color' | '--placeholder-color' | '--text-align'>; export type InputLicenseKeyBoardRef = { clear: () => void; focus: () => void; blur: () => void; }; declare const InputLicenseKeyBoard: React.ForwardRefExoticComponent & { /** 受控值(优先于 defaultValue) */ value?: string | undefined; /** 非受控初始值 */ defaultValue?: string | undefined; /** 值变化回调 */ onChange?: ((val: string) => void) | undefined; /** 占位提示文案 */ placeholder?: string | undefined; /** 是否禁用(禁用后不弹出键盘) */ disabled?: boolean | undefined; /** 是否显示清除按钮(有值时显示清除图标) */ clearable?: boolean | undefined; /** 点击清除按钮时触发 */ onClear?: (() => void) | undefined; /** input 的 id(常用于与 label 关联) */ id?: string | undefined; /** 回车键按下事件(兼容性依赖运行环境) */ onEnterPress?: ((e: React.KeyboardEvent) => void) | undefined; /** 虚拟键盘 Enter 键提示内容 */ enterKeyHint?: "done" | "next" | "search" | "enter" | "go" | "previous" | "send" | undefined; } & { visible?: boolean | undefined; title?: string | undefined; value?: string | undefined; confirmText?: string | null | undefined; showCloseButton?: boolean | undefined; onInput?: ((v: string) => void) | undefined; /** 原生拼写纠正(autoCorrect) */ onDelete?: (() => void) | undefined; /** 键盘释放事件(onKeyUp) */ onClose?: (() => void) | undefined; onConfirm?: (() => void) | undefined; /** 受控值(优先于 defaultValue) */ afterShow?: (() => void) | undefined; afterClose?: (() => void) | undefined; closeOnConfirm?: boolean | undefined; safeArea?: boolean | undefined; } & Pick & { className?: string | undefined; style?: (React.CSSProperties & Partial>) | undefined; tabIndex?: number | undefined; } & React.AriaAttributes & { className?: string | undefined; style?: (React.CSSProperties & Partial>) | undefined; tabIndex?: number | undefined; } & React.RefAttributes>; export default InputLicenseKeyBoard;