import { default as React } from 'react'; import { SelectProps as AntSelectProps } from 'antd'; import { BaseComponentProps, DataSetConfig, ValidationDisplayConfig } from '../../types/common'; /** 自定义 `onChange` 时不写入 store,也不维护 `_selected`(与主字段行为一致) */ export type AndSelectSelectedState = null | { key: any; label: string; } | { key: any[]; label: string[]; }; interface OptionsCfg { url?: string; codeKey?: string; labelKey?: string; /** 请求时的查询参数,如 { pageSize: 100, status: 0 },与 url 一起传给远程接口 */ params?: Record; /** * 响应中选项数组所在字段名。不传时:若响应/response.data 本身为数组则直接用,否则取 list 或 records。 * 指定后从 response/response.data 的该字段取数组,如 "children" 表示从 data.children 取选项列表。 */ field?: string; } /** * AndSelect Props 接口 */ export interface AndSelectProps extends Omit, BaseComponentProps, DataSetConfig, ValidationDisplayConfig { /** 是否启用字典 */ enableDict?: boolean; /** 字典类型 */ dictType?: string; /** 远程选项配置 */ optionsCfg?: OptionsCfg; /** 校验规则 */ rules?: any[]; /** 失焦时校验 */ validateOnBlur?: boolean; /** 修改时校验 */ validateOnChange?: boolean; /** 变更动作 */ changeAction?: string; /** 自定义变更处理函数 */ onChange?: (value: any, option: any) => void; /** 当前未选中时,options 有值后是否自动选中第一个 */ autoSelectFirst?: boolean; /** 迭代器内当前行序号,供 changeAction 使用 @index 占位符 */ index?: number; } /** * AndSelect 组件 * 封装 Ant Design Select,支持字典、远程数据和动作解析 */ export declare const AndSelect: React.FC; export default AndSelect; //# sourceMappingURL=index.d.ts.map