Modify the background color of the activated navigation menu in vue-element-admin

Modify the file of the background color of the directory: src\styles\variables.scss
insert image description here
can be modified to this effect:
insert image description here

How to modify the activated background color?

File path: src\styles\sidebar.scss
rewrites the background color after being activated in the changed file
insert image description here

   a {
    
    
      display: inline-block;
      width: 100%;
      overflow: hidden;
      // 主目录被激活后的菜单背景色
      .el-menu-item.is-active {
    
    
        background-color: #009195 !important;
      }
    }

    // 子目录被激活后的菜单背景色
    .is-active > .el-submenu__title {
    
    
      background-color: #009195 !important;
    }

The final effect:
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/weixin_55966654/article/details/127574774