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.
37 lines
1.4 KiB
37 lines
1.4 KiB
import React from 'react';
|
|
import { FormInstance, FormItemProps, FormProps } from 'antd/lib/form';
|
|
import { IntlType } from '@ant-design/pro-provider';
|
|
import { BaseQueryFilterProps } from '@ant-design/pro-form';
|
|
import { ProSchemaComponentTypes } from '@ant-design/pro-utils';
|
|
import { ProColumns } from '../index';
|
|
import './index.less';
|
|
export interface TableFormItem<T> extends Omit<FormItemProps, 'children'> {
|
|
onSubmit?: (value: T) => void;
|
|
onReset?: () => void;
|
|
form?: Omit<FormProps, 'form'>;
|
|
type?: ProSchemaComponentTypes;
|
|
dateFormatter?: 'string' | 'number' | false;
|
|
search?: false | BaseQueryFilterProps;
|
|
formRef?: React.MutableRefObject<FormInstance | undefined> | ((actionRef: FormInstance) => void);
|
|
}
|
|
export declare type SearchConfig = BaseQueryFilterProps;
|
|
export declare const formInputRender: React.FC<{
|
|
item: ProColumns<any>;
|
|
value?: any;
|
|
form?: FormInstance;
|
|
type: ProSchemaComponentTypes;
|
|
intl: IntlType;
|
|
onChange?: (value: any) => void;
|
|
onSelect?: (value: any) => void;
|
|
[key: string]: any;
|
|
}>;
|
|
export declare const proFormItemRender: (props: {
|
|
item: ProColumns<any>;
|
|
isForm: boolean;
|
|
type: ProSchemaComponentTypes;
|
|
intl: IntlType;
|
|
formInstance?: FormInstance;
|
|
}) => null | JSX.Element;
|
|
declare const FormSearch: <T, U = any>({ onSubmit, formRef, dateFormatter, type, onReset, search: searchConfig, form: formConfig, }: TableFormItem<T>) => JSX.Element;
|
|
export default FormSearch;
|