@cainiaofe/cn-ui-m
Version:
52 lines (51 loc) • 1.52 kB
TypeScript
import { CnSelectProps } from "../../cn-select";
import { CnSelectServiceType } from './cn-select-service-type';
import { CnEmployeeOptionProps } from './cn-employee-option-props';
import { CnEmployeeSelectCommonProps, IComponentPluginProps } from '@cainiaofe/cn-ui-common';
export interface CnEmployeeSelectProps extends CnSelectProps, CnEmployeeSelectCommonProps, IComponentPluginProps {
/**
* 数据源,主动传入即变为受控模式,内置请求逻辑失效
*/
dataSource?: CnEmployeeOptionProps[];
/**
* 自定义请求函数
*/
service?: (searchStr: string, fromType: 'staffId' | 'keywords') => Promise<any[]>;
/**
* 请求数据源类型(cainiao, ali)
*/
serviceType?: CnSelectServiceType;
/**
* 请求是否通过Next.Cone中心化接入
*/
mokelay?: boolean;
/**
* 自定义数据源请求域名
*/
host?: string;
/**
* 自定义数据源请求路径
*/
path?: string;
/**
* 员工属性类型,REGULAR 自有、OUTSOURCING 外包、CASUAL 临时
*/
typeList?: Array<'REGULAR' | 'OUTSOURCING' | 'CASUAL'>;
/**
* 是否显示离职标签
*/
showDepartTag?: boolean;
/**
* 是否在职员工
*/
isOnJob?: boolean;
/**
* 当前选中人员,用于受控模式
*/
value?: string[] | CnEmployeeOptionProps[] | CnEmployeeOptionProps;
/**
* 值是否需要补0
* @default true
*/
valuePaddingZero?: boolean;
}