2020-10-11 13:31:57 +00:00
|
|
|
import PropTypes, { withUndefined } from '../_util/vue-types';
|
2019-01-12 03:33:27 +00:00
|
|
|
import { AbstractSelectProps } from '../select';
|
2018-07-11 09:51:20 +00:00
|
|
|
|
|
|
|
export const TreeData = PropTypes.shape({
|
|
|
|
key: PropTypes.string,
|
|
|
|
value: PropTypes.string,
|
|
|
|
label: PropTypes.any,
|
|
|
|
scopedSlots: PropTypes.object,
|
|
|
|
children: PropTypes.array,
|
2019-01-12 03:33:27 +00:00
|
|
|
}).loose;
|
2018-07-11 09:51:20 +00:00
|
|
|
|
|
|
|
export const TreeSelectProps = () => ({
|
|
|
|
...AbstractSelectProps(),
|
2020-10-10 10:16:28 +00:00
|
|
|
autofocus: PropTypes.looseBool,
|
2018-12-25 04:00:39 +00:00
|
|
|
dropdownStyle: PropTypes.object,
|
2020-10-11 13:31:57 +00:00
|
|
|
filterTreeNode: withUndefined(PropTypes.oneOfType([Function, Boolean])),
|
2018-12-25 04:00:39 +00:00
|
|
|
getPopupContainer: PropTypes.func,
|
2020-10-10 10:16:28 +00:00
|
|
|
labelInValue: PropTypes.looseBool,
|
2018-12-25 04:00:39 +00:00
|
|
|
loadData: PropTypes.func,
|
|
|
|
maxTagCount: PropTypes.number,
|
|
|
|
maxTagPlaceholder: PropTypes.any,
|
2020-01-19 09:01:41 +00:00
|
|
|
value: PropTypes.oneOfType([
|
|
|
|
PropTypes.string,
|
|
|
|
PropTypes.object,
|
|
|
|
PropTypes.array,
|
|
|
|
PropTypes.number,
|
|
|
|
]),
|
|
|
|
defaultValue: PropTypes.oneOfType([
|
|
|
|
PropTypes.string,
|
|
|
|
PropTypes.object,
|
|
|
|
PropTypes.array,
|
|
|
|
PropTypes.number,
|
|
|
|
]),
|
2020-10-10 10:16:28 +00:00
|
|
|
multiple: PropTypes.looseBool,
|
2019-04-10 03:54:42 +00:00
|
|
|
notFoundContent: PropTypes.any,
|
2018-07-11 09:51:20 +00:00
|
|
|
searchPlaceholder: PropTypes.string,
|
2019-01-07 12:59:02 +00:00
|
|
|
searchValue: PropTypes.string,
|
2018-12-25 04:00:39 +00:00
|
|
|
showCheckedStrategy: PropTypes.oneOf(['SHOW_ALL', 'SHOW_PARENT', 'SHOW_CHILD']),
|
|
|
|
suffixIcon: PropTypes.any,
|
2020-10-11 13:31:57 +00:00
|
|
|
treeCheckable: withUndefined(PropTypes.oneOfType([PropTypes.any, PropTypes.looseBool])),
|
2020-10-10 10:16:28 +00:00
|
|
|
treeCheckStrictly: PropTypes.looseBool,
|
2018-12-25 04:00:39 +00:00
|
|
|
treeData: PropTypes.arrayOf(Object),
|
2020-10-11 13:31:57 +00:00
|
|
|
treeDataSimpleMode: withUndefined(PropTypes.oneOfType([PropTypes.looseBool, Object])),
|
2018-12-25 04:00:39 +00:00
|
|
|
|
2018-07-11 09:51:20 +00:00
|
|
|
dropdownClassName: PropTypes.string,
|
2020-10-10 10:16:28 +00:00
|
|
|
dropdownMatchSelectWidth: PropTypes.looseBool,
|
|
|
|
treeDefaultExpandAll: PropTypes.looseBool,
|
2018-12-26 08:33:24 +00:00
|
|
|
treeExpandedKeys: PropTypes.array,
|
2020-10-10 10:16:28 +00:00
|
|
|
treeIcon: PropTypes.looseBool,
|
2018-12-26 08:33:24 +00:00
|
|
|
treeDefaultExpandedKeys: PropTypes.array,
|
2018-07-11 09:51:20 +00:00
|
|
|
treeNodeFilterProp: PropTypes.string,
|
|
|
|
treeNodeLabelProp: PropTypes.string,
|
2020-05-19 06:40:41 +00:00
|
|
|
replaceFields: PropTypes.object.def({}),
|
2020-07-18 13:40:26 +00:00
|
|
|
clearIcon: PropTypes.any,
|
|
|
|
removeIcon: PropTypes.any,
|
2020-08-12 13:35:45 +00:00
|
|
|
|
|
|
|
onSelect: PropTypes.func,
|
|
|
|
onChange: PropTypes.func,
|
|
|
|
onSearch: PropTypes.func,
|
|
|
|
onTreeExpand: PropTypes.func,
|
|
|
|
'onUpdate:treeExpandedKeys': PropTypes.func,
|
|
|
|
'onUpdate:searchValue': PropTypes.func,
|
|
|
|
'onUpdate:value': PropTypes.func,
|
2019-01-12 03:33:27 +00:00
|
|
|
});
|