ant-design-vue/components/tree-select/interface.jsx

65 lines
2.1 KiB
Vue
Raw Normal View History

import PropTypes, { withUndefined } from '../_util/vue-types';
2019-01-12 11:33:27 +08:00
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(),
autofocus: PropTypes.looseBool,
dropdownStyle: PropTypes.object,
filterTreeNode: withUndefined(PropTypes.oneOfType([Function, Boolean])),
getPopupContainer: PropTypes.func,
labelInValue: PropTypes.looseBool,
loadData: PropTypes.func,
maxTagCount: PropTypes.number,
maxTagPlaceholder: PropTypes.any,
2020-01-19 17:01:41 +08:00
value: PropTypes.oneOfType([
PropTypes.string,
PropTypes.object,
PropTypes.array,
PropTypes.number,
]),
defaultValue: PropTypes.oneOfType([
PropTypes.string,
PropTypes.object,
PropTypes.array,
PropTypes.number,
]),
multiple: PropTypes.looseBool,
2019-04-10 11:54:42 +08:00
notFoundContent: PropTypes.any,
2018-07-11 17:51:20 +08:00
searchPlaceholder: PropTypes.string,
2019-01-07 20:59:02 +08:00
searchValue: PropTypes.string,
showCheckedStrategy: PropTypes.oneOf(['SHOW_ALL', 'SHOW_PARENT', 'SHOW_CHILD']),
suffixIcon: PropTypes.any,
treeCheckable: withUndefined(PropTypes.oneOfType([PropTypes.any, PropTypes.looseBool])),
treeCheckStrictly: PropTypes.looseBool,
treeData: PropTypes.arrayOf(Object),
treeDataSimpleMode: withUndefined(PropTypes.oneOfType([PropTypes.looseBool, Object])),
2018-07-11 17:51:20 +08:00
dropdownClassName: PropTypes.string,
dropdownMatchSelectWidth: PropTypes.looseBool,
treeDefaultExpandAll: PropTypes.looseBool,
treeExpandedKeys: PropTypes.array,
treeIcon: PropTypes.looseBool,
treeDefaultExpandedKeys: PropTypes.array,
2018-07-11 17:51:20 +08:00
treeNodeFilterProp: PropTypes.string,
treeNodeLabelProp: PropTypes.string,
replaceFields: PropTypes.object.def({}),
2020-07-18 21:40:26 +08:00
clearIcon: PropTypes.any,
removeIcon: PropTypes.any,
2020-08-12 21:35:45 +08: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 11:33:27 +08:00
});