import {ColorValue, DimensionValue, KeyboardTypeOptions, StyleProp, TextStyle} from "react-native"; import {PageProps} from "../page"; export type IProps = PageProps & { readonly refName?: string /** * 宽度 */ readonly width?: DimensionValue /** * 高度 */ readonly height?: DimensionValue /** * 样式 */ readonly style?: StyleProp | { [key: string]: any } readonly type?: PageInputTypeData readonly keyboardType?: KeyboardTypeOptions | undefined // 清空按钮 图标 readonly isClearBtn?: boolean readonly clearIcon?: string readonly clearIconSize?: number readonly clearIconColor?: ColorValue // 是否自动对焦 readonly autoFocus?: boolean // 是否换行 readonly blurOnSubmit?: boolean readonly max?: number readonly min?: number readonly value?: string readonly ref?: any readonly placeholder?: string readonly placeholderTextColor?: ColorValue readonly onChangeText?: ((text: string) => void) | undefined; // 当文本输入的内容大小更改时调用的回调 readonly onContentSizeChange?: (data: { width: number, height: number }) => void // 获取焦点 onFocus?: () => void // 失去焦点 onBlur?: () => void } export type PageInputType = { readonly text: 'text' readonly password: 'password' readonly textarea: 'textarea' } export type PageInputTypeData = 'text' | 'password' | 'textarea'