import * as React from 'react'; import { GetFieldDecoratorOptions } from 'antd/lib/form/Form'; import { FormItemProps } from 'antd/lib/form'; /** * 单独input表单 */ export declare type Props = { /** * 字段name */ name?: string; /** * 字段类型默认为Input */ type?: 'select' | 'switch' | 'checkbox' | 'number' | 'money' | 'currency' | 'password' | 'email' | 'tel' | 'date' | 'dateRange' | 'time'; /** * form 校验规则信息 */ decoratorOptions?: GetFieldDecoratorOptions; /** * 自定义render * @param field 字段信息 */ render?: (field: Props) => React.ReactNode; /** * group时存在 */ group?: Array; /** * 当type等于'number' | 'money' | 'currency'时格式化参数 */ format?: any; col?: any; isGroup?: boolean; /** * 表单初始化值 */ initialValue?: any; } & { [key: string]: any; } & FormItemProps; /** * 表单字段组件 * @author 田尘殇Sean(sean.snow@live.com) create at 2018/7/28 */ export declare class Field extends React.Component { static defaultProps: { hasFeedback: boolean; }; /** * 去除回车默认行为 * @param e */ onPressEnter(e: any): void; /** * 移动生成field * @param config * @returns {React.ReactNode} */ renderItem(config: any): JSX.Element; render(): JSX.Element; }