import React from 'react'; import { GetQueryDropDownUIControlListData } from './api/getQueryDropDownUIControl/listData'; export interface ItemConfig extends GetQueryDropDownUIControlListData { /** 自定义渲染 Dropdown title */ titleRender?: (data: ItemConfig & { value: any; }) => React.ReactNode; /** 其他属性 */ [index: string]: any; } /** * 多语言配置 */ export interface LocaleType { /** 筛选按钮 */ filterText: string; /** 确认按钮 */ okText: string; /** 取消按钮 */ cancelText: string; /** 重置按钮 */ resetText: string; /** 记忆搜索 */ rememberText: string; /** 其他 */ [index: string]: string; } /** * 查询面板 Props */ export interface QueryDropDownProps { /** 业务标识 */ pageId?: string; /** 表单Id */ formId?: string; /** 查询表单子项配置 */ items?: ItemConfig[]; /** 多语言配置 */ locale?: Partial; /** 查询表单外部默认值, 优先值大于记忆搜索 */ defaultValues?: Record; /** 查询表单外部受控值, 优先值大于记忆搜索 */ values?: Record; /** 是否显示记忆搜索框 */ needRemember?: boolean; /** 控制外部显示字段数量 默认取查询字段前三个 */ outQueryNum?: number; /** 重置回调 */ onReset?: (value: Record) => void; /** 确定回调 */ onOk?: (value: Record) => void; } export interface QueryDropDownState { /** 多语言配置 */ locale: Partial; /** 当前激活的 activeKey */ activeKey: string | null; /** 表单值 */ formValues: Record; /** 查询值 */ queryValues: Record; } /** * 内嵌查询实例方法 */ export interface QueryDropDownInstance { /** 获取表单值 */ getFormValues: () => Record; /** 获取查询值 */ getQueryValues: () => Record; /** 主动调用查询方法 */ query: () => Promise; }