import { Select } from 'antd'; import { SelectProps } from 'antd/es/select'; import { useSearchValue } from './hooks.js'; interface ISelectProps extends SelectProps { /** * 外部传入的需要显示的数据 */ list?: any[]; /** * 默认渲染的列表 */ defaultList?: any[]; /** * 遍历数据的key值 */ createKey?: (data: any, index?: number) => string; /** * 自定义id键值 */ createId?: (data: any, index?: number) => string; /** * data key */ dataKey?: string; /** * title key */ titleKey?: string; /** * join key */ joinKey?: string | string[]; /** * 拼接形式 */ joinStr?: string; /** * 换行展示的数据 */ lineFeedKey?: string | string[]; /** * 换行拼接符 */ lineFeedStr?: string; /** * 是否显示全部 */ showAll?: boolean; /** * 禁用的选项列表 一个dataKey列表 */ disabledValues?: string[]; /** * 是否禁用 */ isDisabled?: (item: any, index: number, allList: any) => boolean; /** * 代理onChange方法 */ onChange?: (value: any, options: any, completeData?: any) => void; /** * 是否支持远程搜索 */ isRemoteSearch?: boolean; /** * 是否需要添加底部按钮 */ dropdownButton?: React.ReactNode; } type ISECRET_COMBOBOX_MODE_DO_NOT_USE = typeof Select.SECRET_COMBOBOX_MODE_DO_NOT_USE; type IOption = typeof Select.Option; type IOptGroup = typeof Select.OptGroup; interface ISelectComponent extends React.ForwardRefExoticComponent> { SECRET_COMBOBOX_MODE_DO_NOT_USE: ISECRET_COMBOBOX_MODE_DO_NOT_USE; Option: IOption; OptGroup: IOptGroup; displayName: string; useSearchValue: typeof useSearchValue; } export { ISelectComponent, ISelectProps };