To solve the problem of clicking on the node to set the node highlight in the tree view of element ui, you need to set it to another color.

clipboard.png

Hello, everyone, just like this. It is now possible to default to the red highlight of the first node.
how do you make it highlight in red when you click on other nodes

Sep.22,2021

style of hover
.el-tree-node__content:hover {
background-color: red;
}
style clicked
.el-tree-node:focus > .el-tree-node__content {
background-color: yellow;
}


this can only be overridden by yourself
View the original code through element review

.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
    background-color: -sharpf0f7ff;
}

I modified: hover style

  .el-tree-node__content:hover {
    background-color: -sharp66b1ff87;
  }

if you want to click instead, it should be OK

<style>
.el-tree-node__content {
    background-color: -sharp66b1ff87;
  }
</style>

by the way, do not use < style scoped >

Menu