import React from 'react'; import { FormInstance, FormItemProps, FormProps } from 'antd/es/form'; import { IntlType } from '../component/intlContext'; import { ProTableTypes } from '../Table'; import { ProColumns } from '../index'; import { FormOptionProps } from './FormOption'; import './index.less'; /** * Default query form configuration */ declare const defaultColConfig: { xs: number; sm: number; md: number; lg: number; xl: number; xxl: number; }; /** * Used to configure the action bar */ export interface SearchConfig { /** * Query button text */ searchText?: string; /** * Text of the reset button */ resetText?: string; span?: number | typeof defaultColConfig; /** * Render of the collapse button */ collapseRender?: (collapsed: boolean, /** * Whether it should be displayed or not, there are two situations * There are only three columns, no need to collapse them * form mode does not need to be closed */ showCollapseButton?: boolean) => React.ReactNode; /** * Render of the bottom operation bar * searchConfig basic configuration * More detailed configuration of props * { type?: 'form' | 'list' | 'table' | 'cardList' | undefined; form: FormInstance; submit: () => void; collapse: boolean; setCollapse: (collapse: boolean) => void; showCollapseButton: boolean; * } */ optionRender?: ((searchConfig: Omit, props: Omit) => React.ReactNode) | false; /** * Whether to close */ collapsed?: boolean; /** * Collapse button event */ onCollapse?: (collapsed: boolean) => void; /** * The text of the submit button */ submitText?: string; } export interface TableFormItem extends Omit { onSubmit?: (value: T) => void; onReset?: () => void; form?: Omit; type?: ProTableTypes; dateFormatter?: 'string' | 'number' | false; search?: boolean | SearchConfig; formRef?: React.MutableRefObject | ((actionRef: FormInstance) => void); } export declare const FormInputRender: React.FC<{ item: ProColumns; value?: any; form?: FormInstance; type: ProTableTypes; intl: IntlType; onChange?: (value: any) => void; onSelect?: (value: any) => void; disabled?: boolean; }>; export declare const proFormItemRender: (props: { item: ProColumns; isForm: boolean; type: ProTableTypes; intl: IntlType; formInstance?: FormInstance; colConfig: { lg: number; md: number; xxl: number; xl: number; sm: number; xs: number; } | { span: number; } | undefined; }) => null | JSX.Element; declare const FormSearch: >({ onSubmit, formRef, dateFormatter, search: propsSearch, type, form: formConfig, onReset, }: TableFormItem) => JSX.Element; export default FormSearch;