2016-09-21 11:54:53 +08:00
|
|
|
import React from 'react';
|
2016-08-01 16:35:01 +08:00
|
|
|
|
2016-09-13 15:31:29 +08:00
|
|
|
export interface TreeData {
|
2016-08-01 16:35:01 +08:00
|
|
|
key: string;
|
|
|
|
value: string;
|
|
|
|
label: React.ReactNode;
|
|
|
|
children?: Array<TreeData>;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface TreeSelectProps {
|
|
|
|
style?: React.CSSProperties;
|
|
|
|
value?: string | Array<any>;
|
|
|
|
defaultValue?: string | Array<any>;
|
|
|
|
multiple?: boolean;
|
|
|
|
tags?: boolean;
|
|
|
|
onSelect?: (value: any) => void;
|
|
|
|
onChange?: (value: any, label: any) => void;
|
|
|
|
allowClear?: boolean;
|
|
|
|
onSearch?: (value: any) => void;
|
|
|
|
placeholder?: string;
|
|
|
|
searchPlaceholder?: string;
|
|
|
|
dropdownStyle?: React.CSSProperties;
|
|
|
|
dropdownMatchSelectWidth?: boolean;
|
|
|
|
combobox?: boolean;
|
|
|
|
size?: 'large' | 'small';
|
|
|
|
showSearch?: boolean;
|
|
|
|
disabled?: boolean;
|
|
|
|
treeDefaultExpandAll?: boolean;
|
|
|
|
treeCheckable?: boolean | React.ReactNode;
|
2016-09-19 10:17:07 +08:00
|
|
|
filterTreeNode?: (inputValue: string, treeNode: any) => boolean | boolean;
|
2016-08-01 16:35:01 +08:00
|
|
|
treeNodeFilterProp?: string;
|
|
|
|
treeNodeLabelProp?: string;
|
|
|
|
treeData?: Array<TreeData>;
|
2016-09-19 10:17:07 +08:00
|
|
|
treeDataSimpleMode?: boolean | Object;
|
2016-08-01 16:35:01 +08:00
|
|
|
loadData?: (node: any) => void;
|
|
|
|
showCheckedStrategy?: 'SHOW_ALL' | 'SHOW_PARENT' | 'SHOW_CHILD';
|
|
|
|
className?: string;
|
|
|
|
prefixCls?: string;
|
|
|
|
notFoundContent?: React.ReactNode;
|
2016-09-19 10:17:07 +08:00
|
|
|
labelInValue?: boolean;
|
|
|
|
treeCheckStrictly?: boolean;
|
|
|
|
getPopupContainer?: (triggerNode: React.ReactNode) => HTMLElement;
|
2016-08-01 16:35:01 +08:00
|
|
|
}
|