2024-12-01 11:56:54 +00:00
|
|
|
|
import { IBaseProps } from '../_util/base';
|
|
|
|
|
export type InputType = 'text' | 'number' | 'idcard' | 'digit'
|
|
|
|
|
/**
|
|
|
|
|
* 支付宝
|
|
|
|
|
*/
|
|
|
|
|
| 'numberpad' | 'digitpad' | 'idcardpad'
|
|
|
|
|
/**
|
|
|
|
|
* 只支持微信
|
|
|
|
|
*/
|
|
|
|
|
| 'safe-password' | 'nickname';
|
2024-11-10 07:01:22 +00:00
|
|
|
|
/**
|
|
|
|
|
* @description 输入框。
|
|
|
|
|
*/
|
|
|
|
|
export interface InputProps extends IBaseProps {
|
2024-12-01 11:56:54 +00:00
|
|
|
|
type?: InputType;
|
|
|
|
|
value?: string;
|
|
|
|
|
defaultValue: string;
|
|
|
|
|
placeholder: string;
|
|
|
|
|
placeholderClassName: string;
|
|
|
|
|
placeholderStyle: string;
|
|
|
|
|
allowClear: boolean;
|
|
|
|
|
enableNative: boolean;
|
|
|
|
|
confirmType: string;
|
|
|
|
|
confirmHold: string;
|
|
|
|
|
controlled: boolean;
|
|
|
|
|
alwaysSystem: boolean;
|
|
|
|
|
selectionStart: number;
|
|
|
|
|
selectionEnd: number;
|
|
|
|
|
cursor: number;
|
|
|
|
|
maxLength?: number;
|
|
|
|
|
inputClassName?: string;
|
|
|
|
|
inputStyle: string;
|
|
|
|
|
password?: boolean;
|
|
|
|
|
prefix?: string;
|
|
|
|
|
disabled?: boolean;
|
|
|
|
|
focusClassName?: string;
|
|
|
|
|
suffix?: string;
|
|
|
|
|
focus?: boolean;
|
|
|
|
|
/**
|
|
|
|
|
* @description 组件名字,用于表单提交获取数据。
|
|
|
|
|
*/
|
|
|
|
|
name?: string;
|
|
|
|
|
focusStyle?: string;
|
|
|
|
|
/**
|
|
|
|
|
* @description 当 type 为 number, digit, idcard 数字键盘是否随机排列。
|
|
|
|
|
* @default false
|
|
|
|
|
*/
|
|
|
|
|
randomNumber?: boolean;
|
|
|
|
|
onChange?: (value: string, e: any) => void;
|
|
|
|
|
onBlur?: (value: string, e: any) => void;
|
|
|
|
|
onFocus?: (value: string, e: any) => void;
|
|
|
|
|
onConfirm?: (value: string, e: any) => void;
|
2024-11-10 07:01:22 +00:00
|
|
|
|
}
|
2024-12-01 11:56:54 +00:00
|
|
|
|
export declare const InputDefaultProps: InputProps;
|