You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
1.2 KiB

import React, { ReactElement } from 'react';
import { FormProps, FormInstance } from 'antd/lib/form/Form';
import { FormItemProps } from 'antd/lib/form';
import { TooltipProps } from 'antd/lib/tooltip';
import { SubmitterProps } from '../components/Submitter';
import { GroupProps, FieldProps, ProFormItemProps } from '../interface';
export interface CommonFormProps {
submitter?: Omit<SubmitterProps, 'form'> | boolean;
}
export interface BaseFormProps extends FormProps, CommonFormProps {
contentRender?: (items: React.ReactNode[], submitter: ReactElement<Omit<SubmitterProps, 'form'>> | undefined) => React.ReactNode;
fieldProps?: FieldProps;
dateFormatter?: 'number' | 'string' | false;
formItemProps?: FormItemProps;
groupProps?: GroupProps;
formRef?: React.MutableRefObject<FormInstance>;
}
export interface ExtendsProps {
secondary?: boolean;
colSize?: number;
tip?: string | TooltipProps;
}
export declare function createField<P extends ProFormItemProps = any>(Field: React.ComponentType<P> | React.ForwardRefExoticComponent<P>): React.ComponentType<P & ExtendsProps>;
declare const BaseForm: React.FC<BaseFormProps>;
export default BaseForm;