gaoluyang
2025-05-07 80fc36a101ea26ff0eb0b41ee389f44084781469
src/assets/styles/sidebar.scss
@@ -5,6 +5,7 @@
    transition: margin-left .28s;
    margin-left: $base-sidebar-width;
    position: relative;
    background: #F5F7FB;
  }
  .sidebarHide {
@@ -12,10 +13,8 @@
  }
  .sidebar-container {
    -webkit-transition: width .28s;
    transition: width 0.28s;
    width: $base-sidebar-width !important;
    background-color: $base-menu-background;
    height: 100%;
    position: fixed;
    font-size: 0px;
@@ -25,7 +24,7 @@
    z-index: 1001;
    overflow: hidden;
    -webkit-box-shadow: 2px 0 6px rgba(0,21,41,.35);
    box-shadow: 2px 0 6px rgba(0,21,41,.35);
    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
    // reset element-ui css
    .horizontal-collapse-transition {
@@ -70,22 +69,25 @@
      width: 100% !important;
    }
    .el-menu-item, .el-sub-menu__title {
    .el-menu-item, .menu-title {
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      white-space: nowrap !important;
    }
    .el-menu-item .el-menu-tooltip__trigger {
      display: inline-block !important;
    }
    // menu hover
    .sub-menu-title-noDropdown,
    .el-sub-menu__title {
      &:hover {
        background-color: rgba(0, 0, 0, 0.06) !important;
        background-color: rgba(212,221,255,0.56) !important;
      }
    }
    & .theme-dark .is-active > .el-sub-menu__title {
      color: $base-menu-color-active !important;
    & .theme-light .is-active > .el-sub-menu__title {
      color: #000000 !important;
    }
    & .nest-menu .el-sub-menu>.el-sub-menu__title,
@@ -93,16 +95,19 @@
      min-width: $base-sidebar-width !important;
      &:hover {
        background-color: rgba(0, 0, 0, 0.06) !important;
        background-color: rgba(212,221,255,0.56) !important;
      }
      &.is-active {
        background-color: rgba(212,221,255,0.56) !important;
      }
    }
    & .theme-dark .nest-menu .el-sub-menu>.el-sub-menu__title,
    & .theme-dark .el-sub-menu .el-menu-item {
      background-color: $base-sub-menu-background !important;
    & .theme-light .nest-menu .el-sub-menu>.el-sub-menu__title,
    & .theme-light .el-sub-menu .el-menu-item {
      //background-color: transparent;
      &:hover {
        background-color: $base-sub-menu-hover !important;
        background-color: rgba(212,221,255,0.56) !important;
      }
    }
  }
@@ -128,7 +133,6 @@
        }
      }
    }
    .el-sub-menu {
      overflow: hidden;
@@ -209,7 +213,10 @@
  .el-menu-item {
    &:hover {
      // you can use $sub-menuHover
      background-color: rgba(0, 0, 0, 0.06) !important;
      background-color: rgba(212,221,255,0.56) !important;
    }
    &.is-active {
      background-color: rgba(212,221,255,0.56) !important;
    }
  }