<div
class="videoTree"
v-loading="loadingTree"
element-loading-text="加载中..."
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.8)"
>
<el-tree
:default-expand-all="true"
class="trees"
:data="cameraData"
:props="defaultProps"
@node-click="handleNodeClick"
:highlight-current="true"
>
</el-tree>
</div>
// el-tree 点击三角去除默认高亮样式(这一句代码)
::v-deep .el-tree-node:focus > .el-tree-node__content {
background-color: transparent !important;
}
下面是设置el-tree样式的代码
.videoTree {
height: calc(100% - 38px);
overflow-y: auto;
.el-tree--highlight-current
.el-tree-node.is-current
> .el-tree-node__content {
background-color: transparent;
background: rgba(128, 243, 232, 0.1);
border-left: 2px solid #33fdff;
color: #80f3e8;
font-weight: bold;
}
.el-tree-node__content:hover {
background-color: transparent;
}
.trees {
background: transparent;
color: #fff;
}
}
}