@lvxiaowu/antd4
Version:
antd4-components
41 lines (39 loc) • 1.02 kB
TypeScript
import * as React from 'react'
import { Select, SelectProps } from 'antd'
interface OptionType {
value: string
label: string
key?: string
}
interface OptionMap {
key?: string
value?: string
label?: string
}
type OptionList = Array<OptionType>
type LoadOptions = (params: string) => OptionList | Promise<OptionList>
export interface SdSelectProps extends Omit<SelectProps<any>, 'options'> {
options?: OptionList | LoadOptions
/**
* 是否显示全部的option选项
*/
showAll?: boolean | OptionType
optionMap?: OptionMap
/**
* 防抖的时间,设置为true相当于500ms
*/
debounceSearch?: boolean | number
/**
* 取selectTypes数据,selectTypes是从App上传进来的
*/
type?: string
/**
* 底部显示全选操作
*/
checkAllAction?: boolean
}
declare class SdSelect extends React.Component<SdSelectProps> {
static Option: typeof Select.Option
static OptGroup: typeof Select.OptGroup
}
export default SdSelect