实现效果:
dom代码:
javascript
复制代码
<div class="left">
<el-tree
class="filter-tree"
:data="state.Options"
:props="{ label: 'name', children: 'children' }"
:expand-on-click-node="false"
ref="TreeRef"
v-loading="state.loadingtree"
node-key="id"
show-checkbox
highlight-current
:default-expand-all="false"
:default-expanded-keys="state.Options[0] && [state.Options[0].id]"
@node-click="handleNodeClick"
@check="handleCheck"
:indent="0"
style="margin-top: 10px; height: 615px"
/>
</div>
css代码:
css
复制代码
.left {
height: 100%;
overflow: auto;
}
.filter-tree {
display: inline-block;
overflow: auto;
}