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

45 lines
1.6 KiB
Vue
Raw Normal View History

2019-01-12 03:33:27 +00:00
import PropTypes from '../_util/vue-types';
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(),
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 09:51:20 +00:00
value: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.array]),
defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.array]),
2018-07-11 09:51:20 +00:00
multiple: PropTypes.bool,
// onSelect: (value: any) => void,
// onChange: (value: any, label: any) => void,
// onSearch: (value: any) => void,
searchPlaceholder: PropTypes.string,
2019-01-07 12:59:02 +00:00
searchValue: PropTypes.string,
showCheckedStrategy: PropTypes.oneOf(['SHOW_ALL', 'SHOW_PARENT', 'SHOW_CHILD']),
suffixIcon: PropTypes.any,
treeCheckable: PropTypes.bool,
treeCheckStrictly: PropTypes.bool,
treeData: PropTypes.arrayOf(Object),
treeDataSimpleMode: PropTypes.oneOfType([Boolean, Object]),
2018-07-11 09:51:20 +00:00
dropdownClassName: PropTypes.string,
dropdownMatchSelectWidth: PropTypes.bool,
treeDefaultExpandAll: PropTypes.bool,
treeExpandedKeys: PropTypes.array,
treeDefaultExpandedKeys: PropTypes.array,
2018-07-11 09:51:20 +00:00
treeNodeFilterProp: PropTypes.string,
treeNodeLabelProp: PropTypes.string,
2019-01-12 03:33:27 +00:00
});