element-plus Tree 树形控件自定义选中高亮
- el-tree 设置高亮
:highlight-current="true"
- 添加以下样式
:deep(.el-tree-node:focus>.el-tree-node__content) {
background-color: transparent !important;
}
:deep(.el-tree-node.is-current > .el-tree-node__content) {
background-color: #e3f4fc !important;
}
:deep(.el-tree-node.is-current > .el-tree-node__content:hover) {
background-color: #e3f4fc !important;
}
:deep(.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content) {
background-color: #e3f4fc !important;
}