import React from 'react'; import type { TablePaginationConfig, DrawerProps } from 'antd'; import type { ProTableProps, ActionType } from '../../typing'; import './index.less'; declare type BaseFormProps = { pagination?: TablePaginationConfig | false; beforeSearchSubmit?: (params: Partial) => any; action: React.MutableRefObject; onSubmit?: (params: U) => void; onReset?: () => void; loading: boolean; onFormSearchSubmit: (params: U) => void; columns: ProTableProps['columns']; dateFormatter: ProTableProps['dateFormatter']; formRef: ProTableProps['formRef']; type: ProTableProps['type']; cardBordered: ProTableProps['cardBordered']; form: ProTableProps['form']; search: ProTableProps['search']; manualRequest: ProTableProps['manualRequest']; gutter?: number; searchSetting?: boolean | { key?: string; resCode?: string; afterLoad?: () => void; }; isDrawer?: boolean; drawerProps?: Omit; }; declare class FormSearch extends React.Component> { /** 查询表单相关的配置 */ onSubmit: (value: U, firstLoad: boolean) => void; onReset: (value: Partial) => void; /** * 只 Diff 需要用的 props,能减少 5 次左右的render * * @param next * @see 因为 hooks 每次的 setFormSearch 都是新的,所以每次都触发 render * @see action 也是同样的原因 * @returns */ isEqual: (next: BaseFormProps) => boolean; shouldComponentUpdate: (next: BaseFormProps) => boolean; render: () => JSX.Element; } export default FormSearch;