ant-design-vue/components/vc-tree/src/TreeNode.jsx

538 lines
14 KiB
Vue
Raw Normal View History

2019-01-12 03:33:27 +00:00
import PropTypes from '../../_util/vue-types';
import classNames from 'classnames';
import { getNodeChildren, mapChildren, warnOnlyTreeNode } from './util';
import { initDefaultProps, filterEmpty, getComponentFromProp } from '../../_util/props-util';
import BaseMixin from '../../_util/BaseMixin';
import getTransitionProps from '../../_util/getTransitionProps';
import { cloneElement } from '../../_util/vnode';
function noop() {}
const ICON_OPEN = 'open';
const ICON_CLOSE = 'close';
const defaultTitle = '---';
2018-03-23 13:30:20 +00:00
const TreeNode = {
2018-03-24 09:12:22 +00:00
name: 'TreeNode',
mixins: [BaseMixin],
2018-07-11 09:51:20 +00:00
__ANT_TREE_NODE: true,
2019-01-12 03:33:27 +00:00
props: initDefaultProps(
{
eventKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), // Pass by parent `cloneElement`
prefixCls: PropTypes.string,
// className: PropTypes.string,
root: PropTypes.object,
// onSelect: PropTypes.func,
// By parent
expanded: PropTypes.bool,
selected: PropTypes.bool,
checked: PropTypes.bool,
loaded: PropTypes.bool,
loading: PropTypes.bool,
halfChecked: PropTypes.bool,
title: PropTypes.any,
pos: PropTypes.string,
dragOver: PropTypes.bool,
dragOverGapTop: PropTypes.bool,
dragOverGapBottom: PropTypes.bool,
// By user
isLeaf: PropTypes.bool,
selectable: PropTypes.bool,
disabled: PropTypes.bool,
disableCheckbox: PropTypes.bool,
icon: PropTypes.any,
dataRef: PropTypes.object,
switcherIcon: PropTypes.any,
label: PropTypes.any,
value: PropTypes.any,
},
{},
),
data() {
2018-03-23 13:30:20 +00:00
return {
dragNodeHighlight: false,
2019-01-12 03:33:27 +00:00
};
2018-03-23 13:30:20 +00:00
},
inject: {
2019-01-28 13:09:13 +00:00
vcTree: { default: () => ({}) },
vcTreeNode: { default: () => ({}) },
2018-03-23 13:30:20 +00:00
},
2019-01-12 03:33:27 +00:00
provide() {
2018-03-24 09:12:22 +00:00
return {
vcTreeNode: this,
2019-01-12 03:33:27 +00:00
};
2018-03-23 13:30:20 +00:00
},
// Isomorphic needn't load data in server side
2019-01-12 03:33:27 +00:00
mounted() {
this.syncLoadData(this.$props);
2018-03-23 13:30:20 +00:00
},
2019-01-12 03:33:27 +00:00
updated() {
this.syncLoadData(this.$props);
2018-03-23 13:30:20 +00:00
},
2018-03-24 09:12:22 +00:00
methods: {
2019-01-12 03:33:27 +00:00
onSelectorClick(e) {
update to antd3.8.3 (#159) * refactor: align * feat: update align to 2.4.3 * feat: update trigger 2.5.4 * feat: update tooltip 3.7.2 * fix: align * feat: update vc-calendar to 9.6.2 * feat: update vc-checkbox to 2.1.5 * feat: update vc-dialog to 7.1.8 * feat: update vc-from to 2.2.1 * feat: update vc-notification to 3.1.1 * test: update snapshots * feat: update vc-tree to 1.12.6 * feat: update vc-table to 6.2.8 * feat: update vc-upload to 2.5.1 * feat: update vc-input-number to 4.0.12 * feat: update vc-tabs to 9.2.6 * refactor: vc-menu * refactor: update vc-menu to 7.0.5 * style: remove unused * feat: update pagination to 1.16.5 * feat: add vc-progress 2.2.5 tag * feat: add vc-rate 2.4.0 tag * feat: update vc-slider to 8.6.1 * fix: tooltip error * style: delete conosle * feat: update vc-steps to 3.1.1 * add vc-switch tag 1.6.0 * feat: update upload to 2.5.1 * fix: update vc-menu * fix: update store * fix: add ref dir * fix: trigger mock shouldComponentUpdate * fix: update vc-select * revert: trigger lazyrenderbox * fix: update vc-select * fix: update vc-select * fix: update vc-select * fix: update vc-menu * fix: update vc-slick ref * update style to 3.8.2 * test: update snapshots * update vc-select * update util & affix * feat: add drawer * fix: support title add slot mode * test: update affix test * update alert * update anchor * update snapshots * fix: doc and vc-drawer * update select & auto-complete * update back-top & grid * feractor: avatar * test: add drawer test * update badge * update button * update card * update divider * feat: update vc-tabs to 9.3.6 and tabs * add afterEnter callback * update form * fix: update drawer * test: update snapshots * update modal & notification * test: update snapshots * update message * update locale-provider * update dropdown * update layout popconfirm popover * update time-picker * update menu * update date-picker * docs: update input docs * update input * update snapshots * update table * update test snapshots * feat: update progress * update checkbox * feat: update spin * update radio * docs: slider steps timeline * update list * update transfer * update collapse * update cascader * update upload
2018-09-05 13:28:54 +00:00
// Click trigger before select/check operation
2019-01-12 03:33:27 +00:00
const {
vcTree: { onNodeClick },
} = this;
onNodeClick(e, this);
2018-03-24 09:12:22 +00:00
if (this.isSelectable()) {
2019-01-12 03:33:27 +00:00
this.onSelect(e);
2018-03-24 09:12:22 +00:00
} else {
2019-01-12 03:33:27 +00:00
this.onCheck(e);
2018-03-24 09:12:22 +00:00
}
},
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
onSelectorDoubleClick(e) {
const {
vcTree: { onNodeDoubleClick },
} = this;
onNodeDoubleClick(e, this);
update to antd3.8.3 (#159) * refactor: align * feat: update align to 2.4.3 * feat: update trigger 2.5.4 * feat: update tooltip 3.7.2 * fix: align * feat: update vc-calendar to 9.6.2 * feat: update vc-checkbox to 2.1.5 * feat: update vc-dialog to 7.1.8 * feat: update vc-from to 2.2.1 * feat: update vc-notification to 3.1.1 * test: update snapshots * feat: update vc-tree to 1.12.6 * feat: update vc-table to 6.2.8 * feat: update vc-upload to 2.5.1 * feat: update vc-input-number to 4.0.12 * feat: update vc-tabs to 9.2.6 * refactor: vc-menu * refactor: update vc-menu to 7.0.5 * style: remove unused * feat: update pagination to 1.16.5 * feat: add vc-progress 2.2.5 tag * feat: add vc-rate 2.4.0 tag * feat: update vc-slider to 8.6.1 * fix: tooltip error * style: delete conosle * feat: update vc-steps to 3.1.1 * add vc-switch tag 1.6.0 * feat: update upload to 2.5.1 * fix: update vc-menu * fix: update store * fix: add ref dir * fix: trigger mock shouldComponentUpdate * fix: update vc-select * revert: trigger lazyrenderbox * fix: update vc-select * fix: update vc-select * fix: update vc-select * fix: update vc-menu * fix: update vc-slick ref * update style to 3.8.2 * test: update snapshots * update vc-select * update util & affix * feat: add drawer * fix: support title add slot mode * test: update affix test * update alert * update anchor * update snapshots * fix: doc and vc-drawer * update select & auto-complete * update back-top & grid * feractor: avatar * test: add drawer test * update badge * update button * update card * update divider * feat: update vc-tabs to 9.3.6 and tabs * add afterEnter callback * update form * fix: update drawer * test: update snapshots * update modal & notification * test: update snapshots * update message * update locale-provider * update dropdown * update layout popconfirm popover * update time-picker * update menu * update date-picker * docs: update input docs * update input * update snapshots * update table * update test snapshots * feat: update progress * update checkbox * feat: update spin * update radio * docs: slider steps timeline * update list * update transfer * update collapse * update cascader * update upload
2018-09-05 13:28:54 +00:00
},
2019-01-12 03:33:27 +00:00
onSelect(e) {
if (this.isDisabled()) return;
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
const {
vcTree: { onNodeSelect },
} = this;
e.preventDefault();
onNodeSelect(e, this);
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
onCheck(e) {
if (this.isDisabled()) return;
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
const { disableCheckbox, checked } = this;
2018-03-24 09:12:22 +00:00
const {
2018-09-26 14:57:01 +00:00
vcTree: { checkable, onNodeCheck },
2019-01-12 03:33:27 +00:00
} = this;
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
if (!checkable || disableCheckbox) return;
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
e.preventDefault();
const targetChecked = !checked;
onNodeCheck(e, this, targetChecked);
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
onMouseEnter(e) {
const {
vcTree: { onNodeMouseEnter },
} = this;
onNodeMouseEnter(e, this);
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
onMouseLeave(e) {
const {
vcTree: { onNodeMouseLeave },
} = this;
onNodeMouseLeave(e, this);
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
onContextMenu(e) {
const {
vcTree: { onNodeContextMenu },
} = this;
onNodeContextMenu(e, this);
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
onDragStart(e) {
const {
vcTree: { onNodeDragStart },
} = this;
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
e.stopPropagation();
2018-03-24 09:12:22 +00:00
this.setState({
dragNodeHighlight: true,
2019-01-12 03:33:27 +00:00
});
onNodeDragStart(e, this);
2018-03-24 09:12:22 +00:00
try {
// ie throw error
// firefox-need-it
2019-01-12 03:33:27 +00:00
e.dataTransfer.setData('text/plain', '');
2018-03-24 09:12:22 +00:00
} catch (error) {
// empty
}
},
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
onDragEnter(e) {
const {
vcTree: { onNodeDragEnter },
} = this;
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
e.preventDefault();
e.stopPropagation();
onNodeDragEnter(e, this);
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
onDragOver(e) {
const {
vcTree: { onNodeDragOver },
} = this;
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
e.preventDefault();
e.stopPropagation();
onNodeDragOver(e, this);
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
onDragLeave(e) {
const {
vcTree: { onNodeDragLeave },
} = this;
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
e.stopPropagation();
onNodeDragLeave(e, this);
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
onDragEnd(e) {
const {
vcTree: { onNodeDragEnd },
} = this;
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
e.stopPropagation();
2018-03-24 09:12:22 +00:00
this.setState({
dragNodeHighlight: false,
2019-01-12 03:33:27 +00:00
});
onNodeDragEnd(e, this);
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
onDrop(e) {
const {
vcTree: { onNodeDrop },
} = this;
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
e.preventDefault();
e.stopPropagation();
2018-03-24 09:12:22 +00:00
this.setState({
dragNodeHighlight: false,
2019-01-12 03:33:27 +00:00
});
onNodeDrop(e, this);
2018-03-24 09:12:22 +00:00
},
// Disabled item still can be switch
2019-01-12 03:33:27 +00:00
onExpand(e) {
const {
vcTree: { onNodeExpand },
} = this;
onNodeExpand(e, this);
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
getNodeChildren() {
const {
$slots: { default: children },
} = this;
const originList = filterEmpty(children);
const targetList = getNodeChildren(originList);
2018-03-23 13:30:20 +00:00
2018-09-26 14:57:01 +00:00
if (originList.length !== targetList.length) {
2019-01-12 03:33:27 +00:00
warnOnlyTreeNode();
2018-03-24 09:12:22 +00:00
}
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
return targetList;
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
getNodeState() {
const { expanded } = this;
2018-03-23 13:30:20 +00:00
2018-03-24 09:12:22 +00:00
if (this.isLeaf2()) {
2019-01-12 03:33:27 +00:00
return null;
2018-03-24 09:12:22 +00:00
}
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
return expanded ? ICON_OPEN : ICON_CLOSE;
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
isLeaf2() {
const { isLeaf, loaded } = this;
const {
vcTree: { loadData },
} = this;
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
const hasChildren = this.getNodeChildren().length !== 0;
update to antd3.8.3 (#159) * refactor: align * feat: update align to 2.4.3 * feat: update trigger 2.5.4 * feat: update tooltip 3.7.2 * fix: align * feat: update vc-calendar to 9.6.2 * feat: update vc-checkbox to 2.1.5 * feat: update vc-dialog to 7.1.8 * feat: update vc-from to 2.2.1 * feat: update vc-notification to 3.1.1 * test: update snapshots * feat: update vc-tree to 1.12.6 * feat: update vc-table to 6.2.8 * feat: update vc-upload to 2.5.1 * feat: update vc-input-number to 4.0.12 * feat: update vc-tabs to 9.2.6 * refactor: vc-menu * refactor: update vc-menu to 7.0.5 * style: remove unused * feat: update pagination to 1.16.5 * feat: add vc-progress 2.2.5 tag * feat: add vc-rate 2.4.0 tag * feat: update vc-slider to 8.6.1 * fix: tooltip error * style: delete conosle * feat: update vc-steps to 3.1.1 * add vc-switch tag 1.6.0 * feat: update upload to 2.5.1 * fix: update vc-menu * fix: update store * fix: add ref dir * fix: trigger mock shouldComponentUpdate * fix: update vc-select * revert: trigger lazyrenderbox * fix: update vc-select * fix: update vc-select * fix: update vc-select * fix: update vc-menu * fix: update vc-slick ref * update style to 3.8.2 * test: update snapshots * update vc-select * update util & affix * feat: add drawer * fix: support title add slot mode * test: update affix test * update alert * update anchor * update snapshots * fix: doc and vc-drawer * update select & auto-complete * update back-top & grid * feractor: avatar * test: add drawer test * update badge * update button * update card * update divider * feat: update vc-tabs to 9.3.6 and tabs * add afterEnter callback * update form * fix: update drawer * test: update snapshots * update modal & notification * test: update snapshots * update message * update locale-provider * update dropdown * update layout popconfirm popover * update time-picker * update menu * update date-picker * docs: update input docs * update input * update snapshots * update table * update test snapshots * feat: update progress * update checkbox * feat: update spin * update radio * docs: slider steps timeline * update list * update transfer * update collapse * update cascader * update upload
2018-09-05 13:28:54 +00:00
if (isLeaf === false) {
2019-01-12 03:33:27 +00:00
return false;
update to antd3.8.3 (#159) * refactor: align * feat: update align to 2.4.3 * feat: update trigger 2.5.4 * feat: update tooltip 3.7.2 * fix: align * feat: update vc-calendar to 9.6.2 * feat: update vc-checkbox to 2.1.5 * feat: update vc-dialog to 7.1.8 * feat: update vc-from to 2.2.1 * feat: update vc-notification to 3.1.1 * test: update snapshots * feat: update vc-tree to 1.12.6 * feat: update vc-table to 6.2.8 * feat: update vc-upload to 2.5.1 * feat: update vc-input-number to 4.0.12 * feat: update vc-tabs to 9.2.6 * refactor: vc-menu * refactor: update vc-menu to 7.0.5 * style: remove unused * feat: update pagination to 1.16.5 * feat: add vc-progress 2.2.5 tag * feat: add vc-rate 2.4.0 tag * feat: update vc-slider to 8.6.1 * fix: tooltip error * style: delete conosle * feat: update vc-steps to 3.1.1 * add vc-switch tag 1.6.0 * feat: update upload to 2.5.1 * fix: update vc-menu * fix: update store * fix: add ref dir * fix: trigger mock shouldComponentUpdate * fix: update vc-select * revert: trigger lazyrenderbox * fix: update vc-select * fix: update vc-select * fix: update vc-select * fix: update vc-menu * fix: update vc-slick ref * update style to 3.8.2 * test: update snapshots * update vc-select * update util & affix * feat: add drawer * fix: support title add slot mode * test: update affix test * update alert * update anchor * update snapshots * fix: doc and vc-drawer * update select & auto-complete * update back-top & grid * feractor: avatar * test: add drawer test * update badge * update button * update card * update divider * feat: update vc-tabs to 9.3.6 and tabs * add afterEnter callback * update form * fix: update drawer * test: update snapshots * update modal & notification * test: update snapshots * update message * update locale-provider * update dropdown * update layout popconfirm popover * update time-picker * update menu * update date-picker * docs: update input docs * update input * update snapshots * update table * update test snapshots * feat: update progress * update checkbox * feat: update spin * update radio * docs: slider steps timeline * update list * update transfer * update collapse * update cascader * update upload
2018-09-05 13:28:54 +00:00
}
2019-01-12 03:33:27 +00:00
return isLeaf || (!loadData && !hasChildren) || (loadData && loaded && !hasChildren);
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
isDisabled() {
const { disabled } = this;
const {
vcTree: { disabled: treeDisabled },
} = this;
2018-03-23 13:30:20 +00:00
2018-03-24 09:12:22 +00:00
// Follow the logic of Selectable
if (disabled === false) {
2019-01-12 03:33:27 +00:00
return false;
2018-03-24 09:12:22 +00:00
}
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
return !!(treeDisabled || disabled);
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
isSelectable() {
const { selectable } = this;
const {
vcTree: { selectable: treeSelectable },
} = this;
2018-03-23 13:30:20 +00:00
2018-03-24 09:12:22 +00:00
// Ignore when selectable is undefined or null
if (typeof selectable === 'boolean') {
2019-01-12 03:33:27 +00:00
return selectable;
2018-03-24 09:12:22 +00:00
}
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
return treeSelectable;
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2018-03-24 09:12:22 +00:00
// Load data to avoid default expanded tree without data
2019-01-12 03:33:27 +00:00
syncLoadData(props) {
const { expanded, loading, loaded } = props;
const {
vcTree: { loadData, onNodeLoad },
} = this;
if (loading) return;
2018-04-11 13:25:16 +00:00
// read from state to avoid loadData at same time
2018-09-28 06:35:26 +00:00
if (loadData && expanded && !this.isLeaf2()) {
update to antd3.8.3 (#159) * refactor: align * feat: update align to 2.4.3 * feat: update trigger 2.5.4 * feat: update tooltip 3.7.2 * fix: align * feat: update vc-calendar to 9.6.2 * feat: update vc-checkbox to 2.1.5 * feat: update vc-dialog to 7.1.8 * feat: update vc-from to 2.2.1 * feat: update vc-notification to 3.1.1 * test: update snapshots * feat: update vc-tree to 1.12.6 * feat: update vc-table to 6.2.8 * feat: update vc-upload to 2.5.1 * feat: update vc-input-number to 4.0.12 * feat: update vc-tabs to 9.2.6 * refactor: vc-menu * refactor: update vc-menu to 7.0.5 * style: remove unused * feat: update pagination to 1.16.5 * feat: add vc-progress 2.2.5 tag * feat: add vc-rate 2.4.0 tag * feat: update vc-slider to 8.6.1 * fix: tooltip error * style: delete conosle * feat: update vc-steps to 3.1.1 * add vc-switch tag 1.6.0 * feat: update upload to 2.5.1 * fix: update vc-menu * fix: update store * fix: add ref dir * fix: trigger mock shouldComponentUpdate * fix: update vc-select * revert: trigger lazyrenderbox * fix: update vc-select * fix: update vc-select * fix: update vc-select * fix: update vc-menu * fix: update vc-slick ref * update style to 3.8.2 * test: update snapshots * update vc-select * update util & affix * feat: add drawer * fix: support title add slot mode * test: update affix test * update alert * update anchor * update snapshots * fix: doc and vc-drawer * update select & auto-complete * update back-top & grid * feractor: avatar * test: add drawer test * update badge * update button * update card * update divider * feat: update vc-tabs to 9.3.6 and tabs * add afterEnter callback * update form * fix: update drawer * test: update snapshots * update modal & notification * test: update snapshots * update message * update locale-provider * update dropdown * update layout popconfirm popover * update time-picker * update menu * update date-picker * docs: update input docs * update input * update snapshots * update table * update test snapshots * feat: update progress * update checkbox * feat: update spin * update radio * docs: slider steps timeline * update list * update transfer * update collapse * update cascader * update upload
2018-09-05 13:28:54 +00:00
// We needn't reload data when has children in sync logic
// It's only needed in node expanded
2019-01-12 03:33:27 +00:00
const hasChildren = this.getNodeChildren().length !== 0;
2018-09-26 14:57:01 +00:00
if (!hasChildren && !loaded) {
2019-01-12 03:33:27 +00:00
onNodeLoad(this);
2018-04-11 13:25:16 +00:00
}
update to antd3.8.3 (#159) * refactor: align * feat: update align to 2.4.3 * feat: update trigger 2.5.4 * feat: update tooltip 3.7.2 * fix: align * feat: update vc-calendar to 9.6.2 * feat: update vc-checkbox to 2.1.5 * feat: update vc-dialog to 7.1.8 * feat: update vc-from to 2.2.1 * feat: update vc-notification to 3.1.1 * test: update snapshots * feat: update vc-tree to 1.12.6 * feat: update vc-table to 6.2.8 * feat: update vc-upload to 2.5.1 * feat: update vc-input-number to 4.0.12 * feat: update vc-tabs to 9.2.6 * refactor: vc-menu * refactor: update vc-menu to 7.0.5 * style: remove unused * feat: update pagination to 1.16.5 * feat: add vc-progress 2.2.5 tag * feat: add vc-rate 2.4.0 tag * feat: update vc-slider to 8.6.1 * fix: tooltip error * style: delete conosle * feat: update vc-steps to 3.1.1 * add vc-switch tag 1.6.0 * feat: update upload to 2.5.1 * fix: update vc-menu * fix: update store * fix: add ref dir * fix: trigger mock shouldComponentUpdate * fix: update vc-select * revert: trigger lazyrenderbox * fix: update vc-select * fix: update vc-select * fix: update vc-select * fix: update vc-menu * fix: update vc-slick ref * update style to 3.8.2 * test: update snapshots * update vc-select * update util & affix * feat: add drawer * fix: support title add slot mode * test: update affix test * update alert * update anchor * update snapshots * fix: doc and vc-drawer * update select & auto-complete * update back-top & grid * feractor: avatar * test: add drawer test * update badge * update button * update card * update divider * feat: update vc-tabs to 9.3.6 and tabs * add afterEnter callback * update form * fix: update drawer * test: update snapshots * update modal & notification * test: update snapshots * update message * update locale-provider * update dropdown * update layout popconfirm popover * update time-picker * update menu * update date-picker * docs: update input docs * update input * update snapshots * update table * update test snapshots * feat: update progress * update checkbox * feat: update spin * update radio * docs: slider steps timeline * update list * update transfer * update collapse * update cascader * update upload
2018-09-05 13:28:54 +00:00
}
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2018-03-24 09:12:22 +00:00
// Switcher
2019-01-12 03:33:27 +00:00
renderSwitcher() {
const { expanded } = this;
const {
vcTree: { prefixCls },
} = this;
const switcherIcon =
getComponentFromProp(this, 'switcherIcon', {}, false) ||
getComponentFromProp(this.vcTree, 'switcherIcon', {}, false);
2018-03-24 09:12:22 +00:00
if (this.isLeaf2()) {
2018-09-26 14:57:01 +00:00
return (
2019-01-12 03:33:27 +00:00
<span
key="switcher"
class={classNames(`${prefixCls}-switcher`, `${prefixCls}-switcher-noop`)}
>
2018-09-26 14:57:01 +00:00
{typeof switcherIcon === 'function'
2019-01-12 03:33:27 +00:00
? cloneElement(switcherIcon({ ...this.$props, isLeaf: true }))
: switcherIcon}
2018-09-26 14:57:01 +00:00
</span>
2019-01-12 03:33:27 +00:00
);
2018-03-24 09:12:22 +00:00
}
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
const switcherCls = classNames(
`${prefixCls}-switcher`,
`${prefixCls}-switcher_${expanded ? ICON_OPEN : ICON_CLOSE}`,
);
2018-03-24 09:12:22 +00:00
return (
2019-01-12 03:33:27 +00:00
<span key="switcher" onClick={this.onExpand} class={switcherCls}>
2018-09-26 14:57:01 +00:00
{typeof switcherIcon === 'function'
2019-01-12 03:33:27 +00:00
? cloneElement(switcherIcon({ ...this.$props, isLeaf: false }))
: switcherIcon}
2018-09-26 14:57:01 +00:00
</span>
2019-01-12 03:33:27 +00:00
);
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2018-03-24 09:12:22 +00:00
// Checkbox
2019-01-12 03:33:27 +00:00
renderCheckbox() {
const { checked, halfChecked, disableCheckbox } = this;
const {
vcTree: { prefixCls, checkable },
} = this;
const disabled = this.isDisabled();
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
if (!checkable) return null;
2018-03-23 13:30:20 +00:00
2018-03-24 09:12:22 +00:00
// [Legacy] Custom element should be separate with `checkable` in future
2019-01-12 03:33:27 +00:00
const $custom = typeof checkable !== 'boolean' ? checkable : null;
2018-03-23 13:30:20 +00:00
2018-03-24 09:12:22 +00:00
return (
<span
2019-01-12 03:33:27 +00:00
key="checkbox"
2018-03-24 09:12:22 +00:00
class={classNames(
`${prefixCls}-checkbox`,
checked && `${prefixCls}-checkbox-checked`,
!checked && halfChecked && `${prefixCls}-checkbox-indeterminate`,
(disabled || disableCheckbox) && `${prefixCls}-checkbox-disabled`,
)}
onClick={this.onCheck}
>
{$custom}
</span>
2019-01-12 03:33:27 +00:00
);
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
renderIcon() {
const { loading } = this;
const {
vcTree: { prefixCls },
} = this;
2018-03-23 13:30:20 +00:00
2018-03-24 09:12:22 +00:00
return (
<span
2019-01-12 03:33:27 +00:00
key="icon"
2018-03-24 09:12:22 +00:00
class={classNames(
`${prefixCls}-iconEle`,
`${prefixCls}-icon__${this.getNodeState() || 'docu'}`,
update to antd3.8.3 (#159) * refactor: align * feat: update align to 2.4.3 * feat: update trigger 2.5.4 * feat: update tooltip 3.7.2 * fix: align * feat: update vc-calendar to 9.6.2 * feat: update vc-checkbox to 2.1.5 * feat: update vc-dialog to 7.1.8 * feat: update vc-from to 2.2.1 * feat: update vc-notification to 3.1.1 * test: update snapshots * feat: update vc-tree to 1.12.6 * feat: update vc-table to 6.2.8 * feat: update vc-upload to 2.5.1 * feat: update vc-input-number to 4.0.12 * feat: update vc-tabs to 9.2.6 * refactor: vc-menu * refactor: update vc-menu to 7.0.5 * style: remove unused * feat: update pagination to 1.16.5 * feat: add vc-progress 2.2.5 tag * feat: add vc-rate 2.4.0 tag * feat: update vc-slider to 8.6.1 * fix: tooltip error * style: delete conosle * feat: update vc-steps to 3.1.1 * add vc-switch tag 1.6.0 * feat: update upload to 2.5.1 * fix: update vc-menu * fix: update store * fix: add ref dir * fix: trigger mock shouldComponentUpdate * fix: update vc-select * revert: trigger lazyrenderbox * fix: update vc-select * fix: update vc-select * fix: update vc-select * fix: update vc-menu * fix: update vc-slick ref * update style to 3.8.2 * test: update snapshots * update vc-select * update util & affix * feat: add drawer * fix: support title add slot mode * test: update affix test * update alert * update anchor * update snapshots * fix: doc and vc-drawer * update select & auto-complete * update back-top & grid * feractor: avatar * test: add drawer test * update badge * update button * update card * update divider * feat: update vc-tabs to 9.3.6 and tabs * add afterEnter callback * update form * fix: update drawer * test: update snapshots * update modal & notification * test: update snapshots * update message * update locale-provider * update dropdown * update layout popconfirm popover * update time-picker * update menu * update date-picker * docs: update input docs * update input * update snapshots * update table * update test snapshots * feat: update progress * update checkbox * feat: update spin * update radio * docs: slider steps timeline * update list * update transfer * update collapse * update cascader * update upload
2018-09-05 13:28:54 +00:00
loading && `${prefixCls}-icon_loading`,
2018-03-24 09:12:22 +00:00
)}
/>
2019-01-12 03:33:27 +00:00
);
2018-03-24 09:12:22 +00:00
},
// Icon + Title
2019-01-12 03:33:27 +00:00
renderSelector(h) {
const { selected, icon, loading, dragNodeHighlight } = this;
const {
vcTree: { prefixCls, showIcon, icon: treeIcon, draggable, loadData },
} = this;
const disabled = this.isDisabled();
const title = getComponentFromProp(this, 'title') || defaultTitle;
const wrapClass = `${prefixCls}-node-content-wrapper`;
2018-03-24 09:12:22 +00:00
// Icon - Still show loading icon when loading without showIcon
2019-01-12 03:33:27 +00:00
let $icon;
2018-03-24 09:12:22 +00:00
if (showIcon) {
2019-01-12 03:33:27 +00:00
const currentIcon = icon || treeIcon;
2018-04-11 13:25:16 +00:00
$icon = currentIcon ? (
2019-01-12 03:33:27 +00:00
<span class={classNames(`${prefixCls}-iconEle`, `${prefixCls}-icon__customize`)}>
{typeof currentIcon === 'function' ? currentIcon({ ...this.$props }, h) : currentIcon}
2018-03-24 09:12:22 +00:00
</span>
2019-01-12 03:33:27 +00:00
) : (
this.renderIcon()
);
update to antd3.8.3 (#159) * refactor: align * feat: update align to 2.4.3 * feat: update trigger 2.5.4 * feat: update tooltip 3.7.2 * fix: align * feat: update vc-calendar to 9.6.2 * feat: update vc-checkbox to 2.1.5 * feat: update vc-dialog to 7.1.8 * feat: update vc-from to 2.2.1 * feat: update vc-notification to 3.1.1 * test: update snapshots * feat: update vc-tree to 1.12.6 * feat: update vc-table to 6.2.8 * feat: update vc-upload to 2.5.1 * feat: update vc-input-number to 4.0.12 * feat: update vc-tabs to 9.2.6 * refactor: vc-menu * refactor: update vc-menu to 7.0.5 * style: remove unused * feat: update pagination to 1.16.5 * feat: add vc-progress 2.2.5 tag * feat: add vc-rate 2.4.0 tag * feat: update vc-slider to 8.6.1 * fix: tooltip error * style: delete conosle * feat: update vc-steps to 3.1.1 * add vc-switch tag 1.6.0 * feat: update upload to 2.5.1 * fix: update vc-menu * fix: update store * fix: add ref dir * fix: trigger mock shouldComponentUpdate * fix: update vc-select * revert: trigger lazyrenderbox * fix: update vc-select * fix: update vc-select * fix: update vc-select * fix: update vc-menu * fix: update vc-slick ref * update style to 3.8.2 * test: update snapshots * update vc-select * update util & affix * feat: add drawer * fix: support title add slot mode * test: update affix test * update alert * update anchor * update snapshots * fix: doc and vc-drawer * update select & auto-complete * update back-top & grid * feractor: avatar * test: add drawer test * update badge * update button * update card * update divider * feat: update vc-tabs to 9.3.6 and tabs * add afterEnter callback * update form * fix: update drawer * test: update snapshots * update modal & notification * test: update snapshots * update message * update locale-provider * update dropdown * update layout popconfirm popover * update time-picker * update menu * update date-picker * docs: update input docs * update input * update snapshots * update table * update test snapshots * feat: update progress * update checkbox * feat: update spin * update radio * docs: slider steps timeline * update list * update transfer * update collapse * update cascader * update upload
2018-09-05 13:28:54 +00:00
} else if (loadData && loading) {
2019-01-12 03:33:27 +00:00
$icon = this.renderIcon();
2018-03-24 09:12:22 +00:00
}
2018-03-23 13:30:20 +00:00
2018-03-24 09:12:22 +00:00
// Title
2019-01-12 03:33:27 +00:00
const $title = <span class={`${prefixCls}-title`}>{title}</span>;
2018-03-23 13:30:20 +00:00
2018-03-24 09:12:22 +00:00
return (
2018-03-23 13:30:20 +00:00
<span
2019-01-12 03:33:27 +00:00
key="selector"
ref="selectHandle"
2018-03-24 09:12:22 +00:00
title={typeof title === 'string' ? title : ''}
2018-03-23 13:30:20 +00:00
class={classNames(
2018-03-24 09:12:22 +00:00
`${wrapClass}`,
`${wrapClass}-${this.getNodeState() || 'normal'}`,
2019-01-12 03:33:27 +00:00
!disabled && (selected || dragNodeHighlight) && `${prefixCls}-node-selected`,
!disabled && draggable && 'draggable',
2018-03-23 13:30:20 +00:00
)}
2018-03-24 09:12:22 +00:00
draggable={(!disabled && draggable) || undefined}
aria-grabbed={(!disabled && draggable) || undefined}
onMouseenter={this.onMouseEnter}
onMouseleave={this.onMouseLeave}
2018-04-12 14:04:55 +00:00
onContextmenu={this.onContextMenu}
2018-03-24 09:12:22 +00:00
onClick={this.onSelectorClick}
update to antd3.8.3 (#159) * refactor: align * feat: update align to 2.4.3 * feat: update trigger 2.5.4 * feat: update tooltip 3.7.2 * fix: align * feat: update vc-calendar to 9.6.2 * feat: update vc-checkbox to 2.1.5 * feat: update vc-dialog to 7.1.8 * feat: update vc-from to 2.2.1 * feat: update vc-notification to 3.1.1 * test: update snapshots * feat: update vc-tree to 1.12.6 * feat: update vc-table to 6.2.8 * feat: update vc-upload to 2.5.1 * feat: update vc-input-number to 4.0.12 * feat: update vc-tabs to 9.2.6 * refactor: vc-menu * refactor: update vc-menu to 7.0.5 * style: remove unused * feat: update pagination to 1.16.5 * feat: add vc-progress 2.2.5 tag * feat: add vc-rate 2.4.0 tag * feat: update vc-slider to 8.6.1 * fix: tooltip error * style: delete conosle * feat: update vc-steps to 3.1.1 * add vc-switch tag 1.6.0 * feat: update upload to 2.5.1 * fix: update vc-menu * fix: update store * fix: add ref dir * fix: trigger mock shouldComponentUpdate * fix: update vc-select * revert: trigger lazyrenderbox * fix: update vc-select * fix: update vc-select * fix: update vc-select * fix: update vc-menu * fix: update vc-slick ref * update style to 3.8.2 * test: update snapshots * update vc-select * update util & affix * feat: add drawer * fix: support title add slot mode * test: update affix test * update alert * update anchor * update snapshots * fix: doc and vc-drawer * update select & auto-complete * update back-top & grid * feractor: avatar * test: add drawer test * update badge * update button * update card * update divider * feat: update vc-tabs to 9.3.6 and tabs * add afterEnter callback * update form * fix: update drawer * test: update snapshots * update modal & notification * test: update snapshots * update message * update locale-provider * update dropdown * update layout popconfirm popover * update time-picker * update menu * update date-picker * docs: update input docs * update input * update snapshots * update table * update test snapshots * feat: update progress * update checkbox * feat: update spin * update radio * docs: slider steps timeline * update list * update transfer * update collapse * update cascader * update upload
2018-09-05 13:28:54 +00:00
onDoubleclick={this.onSelectorDoubleClick}
onDragstart={draggable ? this.onDragStart : noop}
2018-03-23 13:30:20 +00:00
>
2019-01-12 03:33:27 +00:00
{$icon}
{$title}
2018-03-23 13:30:20 +00:00
</span>
2019-01-12 03:33:27 +00:00
);
2018-03-24 09:12:22 +00:00
},
// Children list wrapped with `Animation`
2019-01-12 03:33:27 +00:00
renderChildren() {
const { expanded, pos } = this;
const {
vcTree: { prefixCls, openTransitionName, openAnimation, renderTreeNode },
} = this;
let animProps = {};
2018-03-24 09:12:22 +00:00
if (openTransitionName) {
2019-01-12 03:33:27 +00:00
animProps = getTransitionProps(openTransitionName);
2018-03-24 09:12:22 +00:00
} else if (typeof openAnimation === 'object') {
2019-01-12 03:33:27 +00:00
animProps = { ...openAnimation };
animProps.props = { css: false, ...animProps.props };
2018-03-24 09:12:22 +00:00
}
2018-03-23 13:30:20 +00:00
2018-03-24 09:12:22 +00:00
// Children TreeNode
2019-01-12 03:33:27 +00:00
const nodeList = this.getNodeChildren();
2018-03-23 13:30:20 +00:00
2018-03-24 09:12:22 +00:00
if (nodeList.length === 0) {
2019-01-12 03:33:27 +00:00
return null;
2018-03-23 13:30:20 +00:00
}
2019-01-12 03:33:27 +00:00
let $children;
2018-03-24 09:12:22 +00:00
if (expanded) {
$children = (
<ul
class={classNames(
`${prefixCls}-child-tree`,
expanded && `${prefixCls}-child-tree-open`,
)}
data-expanded={expanded}
2019-01-12 03:33:27 +00:00
role="group"
2018-03-24 09:12:22 +00:00
>
2019-01-12 03:33:27 +00:00
{mapChildren(nodeList, (node, index) => renderTreeNode(node, index, pos))}
2018-03-24 09:12:22 +00:00
</ul>
2019-01-12 03:33:27 +00:00
);
2018-03-24 09:12:22 +00:00
}
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
return <transition {...animProps}>{$children}</transition>;
2018-03-24 09:12:22 +00:00
},
2018-03-23 13:30:20 +00:00
},
2019-01-12 03:33:27 +00:00
render(h) {
2018-03-23 13:30:20 +00:00
const {
2019-01-12 03:33:27 +00:00
dragOver,
dragOverGapTop,
dragOverGapBottom,
update to antd3.8.3 (#159) * refactor: align * feat: update align to 2.4.3 * feat: update trigger 2.5.4 * feat: update tooltip 3.7.2 * fix: align * feat: update vc-calendar to 9.6.2 * feat: update vc-checkbox to 2.1.5 * feat: update vc-dialog to 7.1.8 * feat: update vc-from to 2.2.1 * feat: update vc-notification to 3.1.1 * test: update snapshots * feat: update vc-tree to 1.12.6 * feat: update vc-table to 6.2.8 * feat: update vc-upload to 2.5.1 * feat: update vc-input-number to 4.0.12 * feat: update vc-tabs to 9.2.6 * refactor: vc-menu * refactor: update vc-menu to 7.0.5 * style: remove unused * feat: update pagination to 1.16.5 * feat: add vc-progress 2.2.5 tag * feat: add vc-rate 2.4.0 tag * feat: update vc-slider to 8.6.1 * fix: tooltip error * style: delete conosle * feat: update vc-steps to 3.1.1 * add vc-switch tag 1.6.0 * feat: update upload to 2.5.1 * fix: update vc-menu * fix: update store * fix: add ref dir * fix: trigger mock shouldComponentUpdate * fix: update vc-select * revert: trigger lazyrenderbox * fix: update vc-select * fix: update vc-select * fix: update vc-select * fix: update vc-menu * fix: update vc-slick ref * update style to 3.8.2 * test: update snapshots * update vc-select * update util & affix * feat: add drawer * fix: support title add slot mode * test: update affix test * update alert * update anchor * update snapshots * fix: doc and vc-drawer * update select & auto-complete * update back-top & grid * feractor: avatar * test: add drawer test * update badge * update button * update card * update divider * feat: update vc-tabs to 9.3.6 and tabs * add afterEnter callback * update form * fix: update drawer * test: update snapshots * update modal & notification * test: update snapshots * update message * update locale-provider * update dropdown * update layout popconfirm popover * update time-picker * update menu * update date-picker * docs: update input docs * update input * update snapshots * update table * update test snapshots * feat: update progress * update checkbox * feat: update spin * update radio * docs: slider steps timeline * update list * update transfer * update collapse * update cascader * update upload
2018-09-05 13:28:54 +00:00
isLeaf,
2019-01-12 03:33:27 +00:00
expanded,
selected,
checked,
halfChecked,
loading,
} = this.$props;
const {
vcTree: { prefixCls, filterTreeNode, draggable },
} = this;
const disabled = this.isDisabled();
2018-03-23 13:30:20 +00:00
return (
<li
class={{
[`${prefixCls}-treenode-disabled`]: disabled,
update to antd3.8.3 (#159) * refactor: align * feat: update align to 2.4.3 * feat: update trigger 2.5.4 * feat: update tooltip 3.7.2 * fix: align * feat: update vc-calendar to 9.6.2 * feat: update vc-checkbox to 2.1.5 * feat: update vc-dialog to 7.1.8 * feat: update vc-from to 2.2.1 * feat: update vc-notification to 3.1.1 * test: update snapshots * feat: update vc-tree to 1.12.6 * feat: update vc-table to 6.2.8 * feat: update vc-upload to 2.5.1 * feat: update vc-input-number to 4.0.12 * feat: update vc-tabs to 9.2.6 * refactor: vc-menu * refactor: update vc-menu to 7.0.5 * style: remove unused * feat: update pagination to 1.16.5 * feat: add vc-progress 2.2.5 tag * feat: add vc-rate 2.4.0 tag * feat: update vc-slider to 8.6.1 * fix: tooltip error * style: delete conosle * feat: update vc-steps to 3.1.1 * add vc-switch tag 1.6.0 * feat: update upload to 2.5.1 * fix: update vc-menu * fix: update store * fix: add ref dir * fix: trigger mock shouldComponentUpdate * fix: update vc-select * revert: trigger lazyrenderbox * fix: update vc-select * fix: update vc-select * fix: update vc-select * fix: update vc-menu * fix: update vc-slick ref * update style to 3.8.2 * test: update snapshots * update vc-select * update util & affix * feat: add drawer * fix: support title add slot mode * test: update affix test * update alert * update anchor * update snapshots * fix: doc and vc-drawer * update select & auto-complete * update back-top & grid * feractor: avatar * test: add drawer test * update badge * update button * update card * update divider * feat: update vc-tabs to 9.3.6 and tabs * add afterEnter callback * update form * fix: update drawer * test: update snapshots * update modal & notification * test: update snapshots * update message * update locale-provider * update dropdown * update layout popconfirm popover * update time-picker * update menu * update date-picker * docs: update input docs * update input * update snapshots * update table * update test snapshots * feat: update progress * update checkbox * feat: update spin * update radio * docs: slider steps timeline * update list * update transfer * update collapse * update cascader * update upload
2018-09-05 13:28:54 +00:00
[`${prefixCls}-treenode-switcher-${expanded ? 'open' : 'close'}`]: !isLeaf,
[`${prefixCls}-treenode-checkbox-checked`]: checked,
[`${prefixCls}-treenode-checkbox-indeterminate`]: halfChecked,
[`${prefixCls}-treenode-selected`]: selected,
[`${prefixCls}-treenode-loading`]: loading,
2018-03-23 13:30:20 +00:00
'drag-over': !disabled && dragOver,
'drag-over-gap-top': !disabled && dragOverGapTop,
'drag-over-gap-bottom': !disabled && dragOverGapBottom,
'filter-node': filterTreeNode && filterTreeNode(this),
}}
2019-01-12 03:33:27 +00:00
role="treeitem"
update to antd3.8.3 (#159) * refactor: align * feat: update align to 2.4.3 * feat: update trigger 2.5.4 * feat: update tooltip 3.7.2 * fix: align * feat: update vc-calendar to 9.6.2 * feat: update vc-checkbox to 2.1.5 * feat: update vc-dialog to 7.1.8 * feat: update vc-from to 2.2.1 * feat: update vc-notification to 3.1.1 * test: update snapshots * feat: update vc-tree to 1.12.6 * feat: update vc-table to 6.2.8 * feat: update vc-upload to 2.5.1 * feat: update vc-input-number to 4.0.12 * feat: update vc-tabs to 9.2.6 * refactor: vc-menu * refactor: update vc-menu to 7.0.5 * style: remove unused * feat: update pagination to 1.16.5 * feat: add vc-progress 2.2.5 tag * feat: add vc-rate 2.4.0 tag * feat: update vc-slider to 8.6.1 * fix: tooltip error * style: delete conosle * feat: update vc-steps to 3.1.1 * add vc-switch tag 1.6.0 * feat: update upload to 2.5.1 * fix: update vc-menu * fix: update store * fix: add ref dir * fix: trigger mock shouldComponentUpdate * fix: update vc-select * revert: trigger lazyrenderbox * fix: update vc-select * fix: update vc-select * fix: update vc-select * fix: update vc-menu * fix: update vc-slick ref * update style to 3.8.2 * test: update snapshots * update vc-select * update util & affix * feat: add drawer * fix: support title add slot mode * test: update affix test * update alert * update anchor * update snapshots * fix: doc and vc-drawer * update select & auto-complete * update back-top & grid * feractor: avatar * test: add drawer test * update badge * update button * update card * update divider * feat: update vc-tabs to 9.3.6 and tabs * add afterEnter callback * update form * fix: update drawer * test: update snapshots * update modal & notification * test: update snapshots * update message * update locale-provider * update dropdown * update layout popconfirm popover * update time-picker * update menu * update date-picker * docs: update input docs * update input * update snapshots * update table * update test snapshots * feat: update progress * update checkbox * feat: update spin * update radio * docs: slider steps timeline * update list * update transfer * update collapse * update cascader * update upload
2018-09-05 13:28:54 +00:00
onDragenter={draggable ? this.onDragEnter : noop}
onDragover={draggable ? this.onDragOver : noop}
onDragleave={draggable ? this.onDragLeave : noop}
onDrop={draggable ? this.onDrop : noop}
onDragend={draggable ? this.onDragEnd : noop}
2018-03-23 13:30:20 +00:00
>
{this.renderSwitcher()}
{this.renderCheckbox()}
2018-09-28 06:35:26 +00:00
{this.renderSelector(h)}
2018-03-23 13:30:20 +00:00
{this.renderChildren()}
</li>
2019-01-12 03:33:27 +00:00
);
2018-03-23 13:30:20 +00:00
},
2019-01-12 03:33:27 +00:00
};
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
TreeNode.isTreeNode = 1;
2018-03-23 13:30:20 +00:00
2019-01-12 03:33:27 +00:00
export default TreeNode;