/// import { TreeNodeProps, TreeNodeNamesProps } from '../TreeSearch/TreeSearchProps'; export interface ISelectOptionProps { value: string | number | never; text: string; type?: 'input' | 'select'; options?: { value: string | number | never; text: string; }[]; onSearch?: (e: any) => void; } interface FuzzySearchProps { /** * @description [模糊搜索]设置 Select 的模式为多选或标签 */ mode?: 'multiple' | 'tags'; /** * @description [模糊搜索]请求后端的方法,返回option数组的Promise */ fetchOptions?: (search: string) => Promise<{ key?: string; label: React.ReactNode; value: string | number; }[]>; } export interface ISearchItemProps extends FuzzySearchProps { /** * @description 表单项类型 */ type: 'input' | 'number' | 'select' | 'datePicker' | 'timePicker' | 'dubble-input' | 'dubble-number' | 'select-input' | 'select-date' | 'select-date-more' | 'rangePicker' | 'fuzzy-search' | 'tree-search'; /** * @description 是否占整行 * @default false */ wholeLine?: boolean; /** * @description label */ label: string; /** * @description 快捷时间筛选select字段名 */ selectName?: string; /** * @description select自定义节点 label、value 的字段 */ fieldNames?: { label: string; value: string; }; /** * @description select默认选择值 */ defaultVal?: string; /** * @description 字段名 */ name: string; /** * @description 第二个输入项字段名 */ name2?: string; /** * @description 第一个输入项的placeholder */ placeholder?: string; /** * @description 第二个输入项的placeholder */ placeholder2?: string; /** * @description 两个输入项中间的文案 */ middleText?: string; /** * @description select选项 */ options?: ISelectOptionProps[]; /** * @description input最大输入长度 */ inputMaxLength?: number; /** * @description 数字精度 */ numberPrecision?: number; /** * @description 数字高精度模式 */ stringMode?: boolean; /** * @description 最小值 */ min?: number; /** * @description 最大值 */ max?: number; /** * @description [标签搜索]treeNodes 数据。详情见【树形搜索】中TreeNodeProps */ treeData?: TreeNodeProps[]; /** * @description [标签搜索]设置匹配的 treeNode 的字段名。详情见【树形搜索】中TreeNodeNamesProps */ treeNodeNames?: TreeNodeNamesProps; } export interface SearchFormProps { /** * @description 查询回调 */ onSearch: (e: any) => void; /** * @description 表单项配置列表 */ searchList: ISearchItemProps[]; /** * @description label宽度 * @default 70 */ labelWidth?: number; /** * @description 输入框宽度 * @default 260 */ inputWidth?: number | string; /** * @description 自定义表单项 */ customForms?: { type: string; content: (data: ISearchItemProps, setData: (e: any) => void) => React.ReactNode; }[]; /** * @description 是否禁用查询按钮 * @default false */ disabled?: boolean; /** * @description 暴露出form等,比如页面在新增数据之后需要清空筛选条件再刷新列表。 */ ref?: any; /** * @description 是否显示导出按钮 * @default false * */ hasExport?: boolean; /** * @description 是否禁用导出按钮 * @default false * */ exportDisabled?: boolean; /** * @description 导出函数 * */ onExport?: () => void; } export declare const ISelectOptionProps: (props: ISelectOptionProps) => null; export declare const ISearchItemProps: (props: ISearchItemProps) => null; export declare const FuzzySearchProps: (props: FuzzySearchProps) => null; declare const _default: (props: SearchFormProps) => null; export default _default;