@cainiaofe/cn-ui-m
Version:
30 lines (29 loc) • 978 B
TypeScript
import type { CnSelectProps } from '../../cn-select';
import type { CnAsyncSelectRequestConfig } from './cn-asyncSelect-request-config';
import type { IFieldNames } from './i-field-names';
export interface CnAsyncSelectProps extends Omit<CnSelectProps, 'onVisibleChange'> {
/**
* 用于获取远程数据源的接口地址
*/
remoteUrl?: string;
/**
* 请求配置
*/
requestConfig?: CnAsyncSelectRequestConfig;
/**
* 初始化赋值查询请求配置
*/
initRequestConfig?: CnAsyncSelectRequestConfig;
/**
* 下拉选项可见状态变化时的回调,返回可见状态、触发来源、可触发请求的run函数
*/
onVisibleChange?: (visible: boolean, reason: string | undefined, run: (params: any) => void) => void;
/**
* 自定义节点 label, value, children 的字段
*/
fieldNames?: IFieldNames;
/**
* value 是否一直是数组
*/
isArrayValue?: boolean;
}