import React, { ReactNode } from "react"; import { InputProps, CommonEventFunction } from "@tarojs/components"; export declare type HTMLFormType = "tel" | "text" | "number" | "password" | "idcard" | "digit" | "safe-password" | "nickname"; export declare type FormInputProps = { onChange?: (value: string) => void; onBlur?: (value: string) => void; /** 当键盘输入时,触发input事件,event.detail = {value, cursor, keyCode},处理函数可以直接 return 一个字符串,将替换输入框的内容。 * @supported weapp, h5, rn */ onInput?: CommonEventFunction; /** 输入框聚焦时触发,event.detail = { value, height },height 为键盘高度 * @supported weapp, h5, rn */ onFocus?: CommonEventFunction; /** 输入框失去焦点时触发 * * event.detail = {value: value} * @supported weapp, h5, rn */ value?: string; maxlength?: number; placeholder?: string; type?: HTMLFormType; pattern?: string; RightComponent?: ReactNode; label?: string; labelHtml?: string; LeftComponent?: ReactNode; LeftIcon?: ReactNode; name?: string; readonly?: boolean; withArrow?: boolean; direction?: "row" | "column"; border?: boolean; mainExtra?: ReactNode; padding?: boolean; focus?: boolean; /** 设置键盘右下角按钮的文字 * @default done * @supported weapp, rn */ confirmType?: "send" | "search" | "next" | "go" | "done"; /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上 * @supported h5 */ nativeProps?: Record; className?: string; disabled?: boolean; align?: "left" | "right"; dataTrackId?: string; }; export declare type FocusHandler = { focus: () => void; }; declare const FormInput: React.ForwardRefExoticComponent>; export default FormInput;