0efcbfaa9448e63ce9f9b469448412cb58034181.svn-base 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. #app {
  2. .main-container {
  3. min-height: 100%;
  4. transition: margin-left .28s;
  5. margin-left: $sideBarWidth;
  6. position: relative;
  7. }
  8. .sidebar-container {
  9. transition: width 0.28s;
  10. width: $sideBarWidth !important;
  11. background-color: $menuBg;
  12. height: 100%;
  13. position: fixed;
  14. font-size: 0px;
  15. top: 0;
  16. bottom: 0;
  17. left: 0;
  18. z-index: 1001;
  19. overflow: hidden;
  20. // reset element-ui css
  21. .horizontal-collapse-transition {
  22. transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
  23. }
  24. .scrollbar-wrapper {
  25. overflow-x: hidden !important;
  26. }
  27. .el-scrollbar__bar.is-vertical {
  28. right: 0px;
  29. }
  30. .el-scrollbar {
  31. height: 100%;
  32. }
  33. &.has-logo {
  34. .el-scrollbar {
  35. height: calc(100% - 50px);
  36. }
  37. }
  38. .is-horizontal {
  39. display: none;
  40. }
  41. a {
  42. display: inline-block;
  43. width: 100%;
  44. overflow: hidden;
  45. }
  46. .svg-icon {
  47. margin-right: 16px;
  48. }
  49. .el-menu {
  50. border: none;
  51. height: 100%;
  52. width: 100% !important;
  53. }
  54. // menu hover
  55. .submenu-title-noDropdown,
  56. .el-submenu__title {
  57. &:hover {
  58. background-color: $menuHover !important;
  59. }
  60. }
  61. .is-active>.el-submenu__title {
  62. color: $subMenuActiveText !important;
  63. color:$subMenuHover !important;
  64. }
  65. & .nest-menu .el-submenu>.el-submenu__title,
  66. & .el-submenu .el-menu-item {
  67. min-width: $sideBarWidth !important;
  68. background-color: $subMenuBg !important;
  69. &:hover {
  70. background-color: $subMenuHover !important;
  71. color: #fff !important;
  72. }
  73. }
  74. }
  75. .is-active .el-menu .menu-wrapper .router-link-active .is-active{
  76. background-color: $menuActiveBg !important;
  77. color: #fff !important;
  78. }
  79. .hideSidebar {
  80. .sidebar-container {
  81. width: 54px !important;
  82. }
  83. .main-container {
  84. margin-left: 54px;
  85. }
  86. .submenu-title-noDropdown {
  87. padding: 0 !important;
  88. position: relative;
  89. .el-tooltip {
  90. padding: 0 !important;
  91. .svg-icon {
  92. margin-left: 20px;
  93. }
  94. }
  95. }
  96. .el-submenu {
  97. overflow: hidden;
  98. &>.el-submenu__title {
  99. padding: 0 !important;
  100. .svg-icon {
  101. margin-left: 20px;
  102. }
  103. .el-submenu__icon-arrow {
  104. display: none;
  105. }
  106. }
  107. }
  108. .el-menu--collapse {
  109. .el-submenu {
  110. &>.el-submenu__title {
  111. &>span {
  112. height: 0;
  113. width: 0;
  114. overflow: hidden;
  115. visibility: hidden;
  116. display: inline-block;
  117. }
  118. }
  119. }
  120. }
  121. }
  122. .el-menu--collapse .el-menu .el-submenu {
  123. min-width: $sideBarWidth !important;
  124. }
  125. // mobile responsive
  126. .mobile {
  127. .main-container {
  128. margin-left: 0px;
  129. }
  130. .sidebar-container {
  131. transition: transform .28s;
  132. width: $sideBarWidth !important;
  133. }
  134. &.hideSidebar {
  135. .sidebar-container {
  136. pointer-events: none;
  137. transition-duration: 0.3s;
  138. transform: translate3d(-$sideBarWidth, 0, 0);
  139. }
  140. }
  141. }
  142. .withoutAnimation {
  143. .main-container,
  144. .sidebar-container {
  145. transition: none;
  146. }
  147. }
  148. }
  149. // when menu collapsed
  150. .el-menu--vertical {
  151. &>.el-menu {
  152. .svg-icon {
  153. margin-right: 16px;
  154. }
  155. }
  156. .nest-menu .el-submenu>.el-submenu__title,
  157. .el-menu-item {
  158. &:hover {
  159. // you can use $subMenuHover
  160. background-color: $menuHover !important;
  161. }
  162. }
  163. // the scroll bar appears when the subMenu is too long
  164. >.el-menu--popup {
  165. max-height: 100vh;
  166. overflow-y: auto;
  167. &::-webkit-scrollbar-track-piece {
  168. background: #d3dce6;
  169. }
  170. &::-webkit-scrollbar {
  171. width: 6px;
  172. }
  173. &::-webkit-scrollbar-thumb {
  174. background: #99a9bf;
  175. border-radius: 20px;
  176. }
  177. }
  178. }
  179. #app .sidebar-container .nest-menu .el-submenu > .el-submenu__title:active, #app .sidebar-container .el-submenu .el-menu-item:active{
  180. background-color: $menuActiveBg !important;
  181. }
  182. #app .sidebar-container .nest-menu .el-submenu > .el-submenu__title:focus, #app .sidebar-container .el-submenu .el-menu-item:focus{
  183. background-color: $menuActiveBg !important;
  184. }
  185. #app .sidebar-container .nest-menu .el-submenu > .el-submenu__title:visited, #app .sidebar-container .el-submenu .el-menu-item:visited{
  186. background-color: $menuActiveBg !important;
  187. }
  188. #app .sidebar-container .nest-menu .el-submenu > .el-submenu__title:focus-visible, #app .sidebar-container .el-submenu .el-menu-item:focus-visible{
  189. background-color: $menuActiveBg !important;
  190. }