![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/54d5cb285369ca29a9cbd1a6652ce4e2.png)
overflow控制当前div出现滚动条吧 给谁加就是谁吧
使用 el-scrollbar
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/aac5772540fc2e30cedae1fa66146cf7.png)
不使用 el-scrollbar
<el-tab-pane style="height:500px" label="数据库" name="second">
<el-tree :data="treeData2" id="treeContent2"
:props="menuListTreeProps"
node-key="parentId"
accordion @node-click="checked"
highlight-current
:style="treeHeight"
:filter-node-method="filterNode"
ref="tree2"
>
</el-tree>
</el-tab-pane>
treeHeight:{
overflow: 'auto',
height:'700px',
width:'auto'
},//tree 高度
不使用案例
<el-tree
class="scrollTree"
:style="treeHeight"
:data="treeData"
highlight-current
:props="defaultProps"
:filter-node-method="filterNode"
@node-click="handleNodeClick"
ref="tree">
</el-tree>
treeHeight: {
height: 100+"%",
"overflow":"auto",
},
``
<style>
.scrollTree > .el-tree-node.is-focusable{
width: 200%;
}
</style>
// >是选择一级子类 两个儿子挨得距离近意味着是 连体儿子 挨得远 说明一个儿子 一个孙子
```![在这里插入图片描述](https://img-blog.csdnimg.cn/2020041509020416.png)