2018-03-24 09:12:22 +00:00
|
|
|
import { getOptionProps } from '../../_util/props-util'
|
2018-03-23 13:30:20 +00:00
|
|
|
import Tree from './Tree'
|
|
|
|
import TreeNode from './TreeNode'
|
|
|
|
Tree.TreeNode = TreeNode
|
|
|
|
|
2018-03-24 09:12:22 +00:00
|
|
|
//
|
|
|
|
const NewTree = {
|
|
|
|
TreeNode: TreeNode,
|
|
|
|
props: Tree.props,
|
|
|
|
render () {
|
|
|
|
const { $listeners, $slots } = this
|
|
|
|
const treeProps = {
|
|
|
|
props: {
|
|
|
|
...getOptionProps(this),
|
|
|
|
children: $slots.default,
|
|
|
|
},
|
|
|
|
on: $listeners,
|
|
|
|
}
|
|
|
|
return (
|
|
|
|
<Tree {...treeProps}>{$slots.default}</Tree>
|
|
|
|
)
|
|
|
|
},
|
|
|
|
}
|
2018-03-23 13:30:20 +00:00
|
|
|
export { TreeNode }
|
2018-03-24 09:12:22 +00:00
|
|
|
export default NewTree
|