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 >

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b5d8-34655.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b5d8-34655.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?