123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327 |
- #app {
- .main-container {
- height: 100%;
- transition: margin-left 0.28s;
- margin-left: $base-sidebar-width;
- position: relative;
- }
- .sidebarHide {
- margin-left: 0 !important;
- }
- .sidebar-container {
- -webkit-transition: width 0.28s;
- transition: width 0.28s;
- width: $base-sidebar-width !important;
- background-color: $base-menu-background;
- height: 100%;
- position: fixed;
- font-size: 0;
- top: 50px;
- bottom: 0;
- left: 0;
- z-index: 1001;
- overflow: hidden;
- -webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
- box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
- border-top-right-radius: 16px;
- // reset element-ui css
- .horizontal-collapse-transition {
- transition:
- 0s width ease-in-out,
- 0s padding-left ease-in-out,
- 0s padding-right ease-in-out;
- }
- .scrollbar-wrapper {
- overflow-x: hidden !important;
- }
- .el-scrollbar__bar.is-vertical {
- right: 0;
- }
- .el-scrollbar {
- height: 100%;
- }
- &.has-logo {
- .el-scrollbar {
- height: calc(100% - 50px);
- }
- }
- .is-horizontal {
- display: none;
- }
- a {
- display: inline-block;
- width: 100%;
- overflow: hidden;
- }
- .svg-icon {
- margin-right: 16px;
- }
- .el-menu {
- border: none;
- height: 100%;
- width: 100% !important;
- }
- .el-menu-item,
- .menu-title {
- overflow: hidden !important;
- text-overflow: ellipsis !important;
- white-space: nowrap !important;
- }
- .el-menu-item.is-active {
- background-color: #2c81ff;
- position: relative;
- .menu-title {
- color: #ffffff;
- }
- &::before {
- content: '';
- width: 4px;
- height: 100%;
- background-color: #fff;
- position: absolute;
- top: 0;
- left: 0;
- }
- }
- .el-sub-menu .el-menu-item.is-active {
- background-color: #2c81ff;
- position: relative;
- &::before {
- content: '';
- width: 4px;
- height: 100%;
- background-color: #fff;
- position: absolute;
- top: 0;
- left: 0;
- }
- }
- .is-opened {
- :deep(.el-sub-menu__title) {
- color: #fff !important;
- }
- }
- .el-menu-item .el-menu-tooltip__trigger {
- display: inline-block !important;
- }
- // menu hover
- .theme-dark .sub-menu-title-noDropdown,
- .theme-dark .el-sub-menu__title {
- &:hover {
- color: #fff !important;
- background-color: $base-sub-menu-title-hover !important;
- }
- }
- .sub-menu-title-noDropdown,
- .el-sub-menu__title {
- &:hover {
- color: #fff;
- background-color: #2c81ff !important;
- position: relative;
- &::before {
- content: '';
- width: 4px;
- height: 100%;
- background-color: #fff;
- position: absolute;
- top: 0;
- left: 0;
- }
- }
- }
- & .theme-dark .is-active > .el-sub-menu__title {
- color: $base-menu-color-active !important;
- }
- & .nest-menu .el-sub-menu > .el-sub-menu__title,
- & .el-sub-menu .el-menu-item {
- min-width: $base-sidebar-width !important;
- &:hover {
- position: relative;
- background-color: #2c81ff !important;
- .el-sub-menu__title, .menu-title {
- color: #ffffff !important;
- }
- &::before {
- content: '';
- width: 4px;
- height: 100%;
- background-color: #fff;
- position: absolute;
- top: 0;
- left: 0;
- }
- }
- }
- & .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;
- &:hover {
- position: relative;
- background-color: #2c81ff !important;
- color: #fff;
- &::before {
- content: '';
- width: 4px;
- height: 100%;
- background-color: #fff;
- position: absolute;
- top: 0;
- left: 0;
- }
- }
- }
- //& .theme-dark .nest-menu .el-sub-menu > .el-sub-menu__title,
- & .theme-dark .el-sub-menu .el-menu-item.is-active {
- background-color: #2c81ff !important;
- }
- & .theme-dark .nest-menu .el-sub-menu > .el-sub-menu__title,
- & .theme-dark .el-menu-item {
- &:hover {
- // you can use $sub-menuHover
- position: relative;
- background-color: #2c81ff !important;
- &::before {
- content: '';
- width: 4px;
- height: 100%;
- background-color: #fff;
- position: absolute;
- top: 0;
- left: 0;
- }
- }
- }
- & .nest-menu .el-sub-menu > .el-sub-menu__title,
- & .el-menu-item {
- &:hover {
- // you can use $sub-menuHover
- position: relative;
- background-color: #2c81ff !important;
- color: #ffffff;
- &::before {
- content: '';
- width: 4px;
- height: 100%;
- background-color: #fff;
- position: absolute;
- top: 0;
- left: 0;
- }
- }
- }
- }
- .hideSidebar {
- .sidebar-container {
- width: 54px !important;
- }
- .main-container {
- margin-left: 54px;
- }
- .sub-menu-title-noDropdown {
- padding: 0 !important;
- position: relative;
- .el-tooltip {
- padding: 0 !important;
- .svg-icon {
- margin-left: 20px;
- }
- }
- }
- .el-sub-menu {
- overflow: hidden;
- & > .el-sub-menu__title {
- padding: 0 !important;
- .svg-icon {
- margin-left: 20px;
- }
- }
- }
- .el-menu--collapse {
- .el-sub-menu {
- & > .el-sub-menu__title {
- & > span {
- height: 0;
- width: 0;
- overflow: hidden;
- visibility: hidden;
- display: inline-block;
- }
- & > i {
- height: 0;
- width: 0;
- overflow: hidden;
- visibility: hidden;
- display: inline-block;
- }
- }
- }
- }
- }
- .el-menu--collapse .el-menu .el-sub-menu {
- min-width: $base-sidebar-width !important;
- }
- // mobile responsive
- .mobile {
- .main-container {
- margin-left: 0px;
- }
- .sidebar-container {
- transition: transform 0.28s;
- width: $base-sidebar-width !important;
- }
- &.hideSidebar {
- .sidebar-container {
- pointer-events: none;
- transition-duration: 0.3s;
- transform: translate3d(-$base-sidebar-width, 0, 0);
- }
- }
- }
- .withoutAnimation {
- .main-container,
- .sidebar-container {
- transition: none;
- }
- }
- }
- // when menu collapsed
- .el-menu--vertical {
- & > .el-menu {
- .svg-icon {
- margin-right: 16px;
- }
- }
- }
|