UNPKG

@molejs/mole-components-web

Version:

React组件库

55 lines (54 loc) 2 kB
import PropTypes from 'prop-types'; import React from 'react'; import CustomInput from './CustomInput'; import Input from './Input'; import { InputItemPropsType } from './PropsType'; import { Omit } from '../_util/types'; export declare type HTMLInputProps = Omit<React.HTMLProps<HTMLInputElement>, 'onChange' | 'onFocus' | 'onBlur' | 'value' | 'defaultValue' | 'type'>; export interface InputItemProps extends InputItemPropsType, HTMLInputProps { prefixCls?: string; prefixListCls?: string; className?: string; onErrorClick?: React.MouseEventHandler<HTMLDivElement>; onExtraClick?: React.MouseEventHandler<HTMLDivElement>; } declare function noop(): void; declare class InputItem extends React.Component<InputItemProps, any> { static defaultProps: { prefixCls: string; prefixListCls: string; type: string; editable: boolean; disabled: boolean; placeholder: string; clear: boolean; onChange: typeof noop; onBlur: typeof noop; onFocus: typeof noop; extra: string; onExtraClick: typeof noop; error: boolean; onErrorClick: typeof noop; labelNumber: number; updatePlaceholder: boolean; moneyKeyboardAlign: string; }; static contextTypes: { antLocale: PropTypes.Requireable<object>; }; inputRef: Input | CustomInput | null; private debounceTimeout; constructor(props: InputItemProps); componentWillReceiveProps(nextProps: InputItemProps): void; componentWillUnmount(): void; onInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void; handleOnChange: (value: string) => void; onInputFocus: (value: string) => void; onInputBlur: (value: string) => void; onExtraClick: (e: React.MouseEvent<HTMLDivElement>) => void; onErrorClick: (e: React.MouseEvent<HTMLDivElement>) => void; clearInput: () => void; focus: () => void; render(): JSX.Element; } export default InputItem;