You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
643 B

import React from 'react';
import Tree from 'rc-tree';
9 years ago
import animation from '../common/openAnimation';
const AntTree = React.createClass({
getDefaultProps() {
return {
9 years ago
prefixCls: 'ant-tree',
checkable: false,
showIcon: false,
9 years ago
openAnimation: animation,
};
},
render() {
9 years ago
const props = this.props;
let checkable = props.checkable;
if (checkable) {
checkable = <span className={`${props.prefixCls}-checkbox-inner`}></span>;
}
9 years ago
return <Tree {...props} checkable={checkable}>
{this.props.children}
</Tree>;
}
});
AntTree.TreeNode = Tree.TreeNode;
export default AntTree;