import { OptionProps, SelectProps } from '@firesoon/antd/lib/select/index'; import React from 'react'; export interface SelectDataProps { name: string; code: string; initials?: string; disabled?: boolean; } export interface CustomSelectProps extends SelectProps { /** 下拉列表 */ data?: Array; /** 可配置下拉列表name对应的key值,默认name */ name?: string; /** 可配置下拉列表code对应的key值, 默认code */ code?: string; /** 可配置下拉列表initials对应的key值, 默认为initials */ initials?: string; /** 是否有全部的选项,默认为true */ hasAll?: boolean; /** 全部选项对应的code值,默认为 all */ allCode?: string; /** 全部选项对应显示的label */ allLabel?: string; /** 全部选项对应的拼音缩小,默认为'' */ allInitials?: string; /** 下拉框的label */ label?: string; /** 是否label */ hideLabel?: boolean; /** 最外层类名 */ wrapClassName?: string; /** 是否默认高亮第一个选项 */ defaultActiveFirstOption?: boolean; /** 设置 true 时开启虚拟滚动,如果传true,itemSize默认40, height默认250 */ virtual?: boolean | { height?: number; itemSize: number; }; /** 埋点数据渲染位置,默认渲染在select上,如果读取不到,可以设置渲染在option上 */ logRender?: 'select' | 'option'; } export interface SelectDecorator extends React.FC { Option: React.ClassicComponentClass; } export interface ContextValues { virtual?: boolean | { height?: number; itemSize: number; }; }