/**
 * title: "基本树结构"
 * description: "通过 defaultSelectedKeys 属性设置默认选中项，通过 defaultExpandedKeys 属性设置默认展开项。"
 */
import React from 'react';
import { Tree } from '@alicloud/console-components';

const TreeNode = Tree.Node;

export default () => {
  return (
    <Tree defaultSelectedKeys={['14']} defaultExpandedKeys={['0', '7', '11']}>
      <TreeNode label="默认项" key="0">
        <TreeNode label="默认项" key="1">
          <TreeNode label="默认项" key="4" />
          <TreeNode label="默认项" key="5" />
        </TreeNode>
        <TreeNode label="聚焦项" key="2">
          <TreeNode label="默认项" key="6">
            <TreeNode label="默认项" key="10" />
          </TreeNode>
          <TreeNode label="默认项" key="7">
            <TreeNode label="默认项" key="11">
              <TreeNode label="默认项" key="15" />
            </TreeNode>
            <TreeNode label="默认项" key="12" />
            <TreeNode label="聚焦项" key="13" />
            <TreeNode label="选中项" key="14" />
          </TreeNode>
        </TreeNode>
        <TreeNode label="禁用项" key="3" disabled>
          <TreeNode label="叶子" key="8" />
          <TreeNode label="叶子" key="9" />
        </TreeNode>
      </TreeNode>
    </Tree>
  );
};


