123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- #app {
- .main-container {
- position: relative;
- min-height: 100%;
- margin-left: $sideBarWidth;
- transition: margin-left 0.28s;
- }
- .sidebar-container {
- position: fixed;
- top: 0;
- bottom: 0;
- left: 0;
- z-index: 1001;
- width: $sideBarWidth !important;
- height: 100%;
- overflow: hidden;
- background-color: $menuBg;
- transition: width 0.28s;
- // 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;
- }
- .svg-icon {
- margin-right: 16px;
- }
- .sub-el-icon {
- margin-right: 12px;
- margin-left: -2px;
- }
- .el-menu {
- width: 100% !important;
- height: 100%;
- border: none;
- }
- .el-sub-menu__title {
- display: none;
- }
- .el-menu-item {
- margin: 36px auto 0;
- width: 210px;
- height: 38px;
- line-height: 38px;
- border-radius: 5px;
- color: #657dbc;
- font-size: 16px;
- padding-left: 30px;
- span {
- color: $menuText;
- }
- &.is-active {
- background: $menuHover;
- color: #ffffff;
- span {
- color: $menuBg;
- }
- }
- }
- }
- .hideSidebar {
- .sidebar-container {
- width: 54px !important;
- .el-menu-item {
- width: 44px !important;
- padding: 0;
- margin: 0 auto;
- .el-menu-tooltip__trigger {
- padding: 0;
- }
- }
- .svg-icon {
- margin: 0 auto;
- }
- }
- .main-container {
- margin-left: 54px;
- }
- }
- // mobile responsive
- .mobile {
- .main-container {
- margin-left: 0;
- }
- .sidebar-container {
- width: $sideBarWidth !important;
- transition: transform 0.28s;
- }
- &.hideSidebar {
- .sidebar-container {
- pointer-events: none;
- transition-duration: 0.3s;
- transform: translate3d(-$sideBarWidth, 0, 0);
- }
- }
- }
- .withoutAnimation {
- .main-container,
- .sidebar-container {
- transition: none;
- }
- }
- }
|