2019-01-12 11:33:27 +08:00
|
|
|
import PropTypes from '../_util/vue-types';
|
|
|
|
import { AbstractSelectProps } from '../select';
|
2018-07-11 17:51:20 +08:00
|
|
|
|
|
|
|
export const TreeData = PropTypes.shape({
|
|
|
|
key: PropTypes.string,
|
|
|
|
value: PropTypes.string,
|
|
|
|
label: PropTypes.any,
|
|
|
|
scopedSlots: PropTypes.object,
|
|
|
|
children: PropTypes.array,
|
2019-01-12 11:33:27 +08:00
|
|
|
}).loose;
|
2018-07-11 17:51:20 +08:00
|
|
|
|
|
|
|
export const TreeSelectProps = () => ({
|
|
|
|
...AbstractSelectProps(),
|
2018-12-25 12:00:39 +08:00
|
|
|
autoFocus: PropTypes.bool,
|
|
|
|
dropdownStyle: PropTypes.object,
|
|
|
|
filterTreeNode: PropTypes.oneOfType([Function, Boolean]),
|
|
|
|
getPopupContainer: PropTypes.func,
|
|
|
|
labelInValue: PropTypes.bool,
|
|
|
|
loadData: PropTypes.func,
|
|
|
|
maxTagCount: PropTypes.number,
|
|
|
|
maxTagPlaceholder: PropTypes.any,
|
2018-07-11 17:51:20 +08:00
|
|
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.array]),
|
2018-12-26 16:33:24 +08:00
|
|
|
defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.array]),
|
2018-07-11 17:51:20 +08:00
|
|
|
multiple: PropTypes.bool,
|
2019-04-10 11:54:42 +08:00
|
|
|
notFoundContent: PropTypes.any,
|
2018-07-11 17:51:20 +08:00
|
|
|
// onSelect: (value: any) => void,
|
|
|
|
// onChange: (value: any, label: any) => void,
|
|
|
|
// onSearch: (value: any) => void,
|
|
|
|
searchPlaceholder: PropTypes.string,
|
2019-01-07 20:59:02 +08:00
|
|
|
searchValue: PropTypes.string,
|
2018-12-25 12:00:39 +08:00
|
|
|
showCheckedStrategy: PropTypes.oneOf(['SHOW_ALL', 'SHOW_PARENT', 'SHOW_CHILD']),
|
|
|
|
suffixIcon: PropTypes.any,
|
2019-04-10 11:54:42 +08:00
|
|
|
treeCheckable: PropTypes.oneOfType([PropTypes.any, PropTypes.bool]),
|
2018-12-25 12:00:39 +08:00
|
|
|
treeCheckStrictly: PropTypes.bool,
|
|
|
|
treeData: PropTypes.arrayOf(Object),
|
|
|
|
treeDataSimpleMode: PropTypes.oneOfType([Boolean, Object]),
|
|
|
|
|
2018-07-11 17:51:20 +08:00
|
|
|
dropdownClassName: PropTypes.string,
|
|
|
|
dropdownMatchSelectWidth: PropTypes.bool,
|
|
|
|
treeDefaultExpandAll: PropTypes.bool,
|
2018-12-26 16:33:24 +08:00
|
|
|
treeExpandedKeys: PropTypes.array,
|
2019-04-10 11:54:42 +08:00
|
|
|
treeIcon: PropTypes.bool,
|
2018-12-26 16:33:24 +08:00
|
|
|
treeDefaultExpandedKeys: PropTypes.array,
|
2018-07-11 17:51:20 +08:00
|
|
|
treeNodeFilterProp: PropTypes.string,
|
|
|
|
treeNodeLabelProp: PropTypes.string,
|
2019-01-12 11:33:27 +08:00
|
|
|
});
|