图中没有横向滚动条,而且内容还被遮盖。
解决办法
.el-tree {
display: inline-block;
min-width: 100%;
}
我这个滚动条用的是自定义的,为了让滚动条好看点就找了element的用法很简单
<div style="float:right;width:150px;height:200px;margin-right:100px;">
<el-scrollbar style="height:100%;">
<el-tree :data="data" show-checkbox node-key="id" :default-expanded-keys="[1, 3,]" :default-checked-keys=" [5]" :props="defaultProps">
</el-tree>
</el-scrollbar>
</div>