UNPKG

@nutui/nutui-react

Version:

京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序

30 lines (29 loc) 1.3 kB
import { default as React, HTMLInputTypeAttribute } from 'react'; import { InputProps as TaroInputProps, ITouchEvent } from '@tarojs/components'; import { BasicComponent } from '../../utils/typings'; export type InputAlign = 'left' | 'center' | 'right'; export type InputFormatTrigger = 'onChange' | 'onBlur'; export type InputConfirmType = 'send' | 'search' | 'next' | 'go' | 'done'; export interface InputProps extends BasicComponent { type: keyof TaroInputProps.Type | HTMLInputTypeAttribute; name: string; defaultValue?: string; value?: string; placeholder?: string; align: InputAlign; disabled: boolean; readOnly: boolean; maxLength: number; clearable: boolean; clearIcon: React.ReactNode; formatTrigger: InputFormatTrigger; autoFocus: boolean; confirmType: InputConfirmType; formatter?: (value: string) => void; onChange?: (value: string) => void; onBlur?: (value: string) => void; onFocus?: (value: string, height?: number) => void; onClear?: (value: string) => void; onClick?: (e: ITouchEvent) => void; } export declare const Input: React.ForwardRefExoticComponent<Partial<InputProps> & Partial<Omit<TaroInputProps, "type" | "ref" | "onFocus" | "onBlur" | "password" | "maxlength">> & React.RefAttributes<unknown>>;