【前端】智能库房综合管理系统前端项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

292 lines
5.5 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. #app {
  2. .main-container {
  3. min-height: 100%;
  4. transition: margin-left .28s;
  5. margin-left: $sideBarWidth;
  6. position: relative;
  7. padding-top: 100px;
  8. }
  9. .sidebar-container {
  10. transition: width 0.28s;
  11. width: $sideBarWidth !important;
  12. background-color: $menuBg;
  13. height: 100%;
  14. position: fixed;
  15. font-size: 0;
  16. top: 100px;
  17. bottom: 0;
  18. left: 0;
  19. z-index: 99;
  20. background: url(~@/assets/images/sidebar_bg.png) #031435 no-repeat right bottom;
  21. background-size: contain;
  22. box-shadow: 5px 2px 10px 1px rgba(15,164,222,0.16);
  23. overflow: hidden;
  24. // reset element-ui css
  25. .horizontal-collapse-transition {
  26. transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
  27. }
  28. .scrollbar-wrapper {
  29. overflow-x: hidden !important;
  30. }
  31. .el-scrollbar__bar.is-vertical {
  32. right: 0;
  33. }
  34. .el-scrollbar {
  35. height: 100%;
  36. }
  37. &.has-logo {
  38. .el-scrollbar {
  39. height: calc(100% - 50px);
  40. }
  41. }
  42. .is-horizontal {
  43. display: none;
  44. }
  45. a {
  46. display: inline-block;
  47. width: 100%;
  48. overflow: hidden;
  49. }
  50. .svg-icon {
  51. margin-right: 10px;
  52. }
  53. .el-submenu__icon-arrow{
  54. font-size: 18px;
  55. color: #339CFF;
  56. right: 60px;
  57. }
  58. .el-menu {
  59. border: none;
  60. height: 100%;
  61. width: 100% !important;
  62. background-color: transparent !important;
  63. }
  64. // menu hover
  65. .submenu-title-noDropdown,
  66. .el-submenu__title {
  67. font-size: 16px;
  68. height: 60px !important;
  69. line-height: 60px !important;
  70. padding: 0 60px 0 58px !important;
  71. background-color: transparent !important;
  72. &:hover {
  73. background-image: $menuActiveBg !important;
  74. &::before{
  75. content: "";
  76. position: absolute;
  77. left: 0;
  78. top: 0;
  79. width: 5px;
  80. height: 60px;
  81. background-color: #339CFF;
  82. }
  83. }
  84. }
  85. .is-active>.el-submenu__title,
  86. .is-active.submenu-title-noDropdown {
  87. position: relative;
  88. color: $subMenuActiveText !important;
  89. background-image: $menuActiveBg !important;
  90. &::before{
  91. content: "";
  92. position: absolute;
  93. left: 0;
  94. top: 0;
  95. width: 5px;
  96. height: 60px;
  97. background-color: #339CFF;
  98. }
  99. }
  100. & .nest-menu .el-submenu>.el-submenu__title,
  101. & .el-submenu .el-menu-item {
  102. min-width: $sideBarWidth !important;
  103. background-color: transparent !important;
  104. &:hover {
  105. background-image: $subMenuHover !important;
  106. }
  107. }
  108. & .el-submenu .el-menu-item{
  109. position: relative;
  110. padding: 0 60px 0 82px !important;
  111. height: 40px !important;
  112. line-height: 40px;
  113. &::before{
  114. content: "";
  115. position: absolute;
  116. left: 56px;
  117. top: 50%;
  118. width: 6px;
  119. height: 6px;
  120. background-color: #fff;
  121. border-radius: 50%;
  122. transform: translateY(-50%);
  123. }
  124. .svg-icon {
  125. display: none;
  126. }
  127. }
  128. }
  129. .hideSidebar {
  130. .sidebar-container {
  131. width: 54px !important;
  132. }
  133. .main-container {
  134. margin-left: 54px;
  135. }
  136. .submenu-title-noDropdown {
  137. padding: 0 !important;
  138. position: relative;
  139. .el-tooltip {
  140. padding: 0 !important;
  141. .svg-icon {
  142. margin-left: 20px;
  143. }
  144. }
  145. }
  146. .el-submenu {
  147. overflow: hidden;
  148. &>.el-submenu__title {
  149. padding: 0 !important;
  150. .svg-icon {
  151. margin-left: 20px;
  152. }
  153. .el-submenu__icon-arrow {
  154. display: none;
  155. }
  156. }
  157. }
  158. .el-menu--collapse {
  159. .el-submenu {
  160. &>.el-submenu__title {
  161. &>span {
  162. height: 0;
  163. width: 0;
  164. overflow: hidden;
  165. visibility: hidden;
  166. display: inline-block;
  167. }
  168. }
  169. }
  170. }
  171. .main-breadcrumb{
  172. left: 54px;
  173. }
  174. }
  175. .el-menu--collapse .el-menu .el-submenu {
  176. min-width: $sideBarWidth !important;
  177. }
  178. // mobile responsive
  179. .mobile {
  180. .main-container {
  181. margin-left: 0;
  182. }
  183. .sidebar-container {
  184. transition: transform .28s;
  185. width: $sideBarWidth !important;
  186. }
  187. &.hideSidebar {
  188. .sidebar-container {
  189. pointer-events: none;
  190. transition-duration: 0.3s;
  191. transform: translate3d(-$sideBarWidth, 0, 0);
  192. }
  193. }
  194. }
  195. .withoutAnimation {
  196. .main-container,
  197. .sidebar-container {
  198. transition: none;
  199. }
  200. }
  201. }
  202. .is-active.el-menu-item {
  203. background-image: $subMenuActiveBg !important;
  204. }
  205. // when menu collapsed
  206. .el-menu--vertical {
  207. &>.el-menu {
  208. .svg-icon {
  209. display: none;
  210. margin-right: 16px;
  211. }
  212. }
  213. .nest-menu .el-submenu>.el-submenu__title,
  214. .el-menu-item {
  215. position: relative;
  216. padding-left: 50px !important;
  217. height: 40px !important;
  218. line-height: 40px;
  219. &::before{
  220. content: "";
  221. position: absolute;
  222. left: 30px;
  223. top: 50%;
  224. width: 6px;
  225. height: 6px;
  226. background-color: #fff;
  227. border-radius: 50%;
  228. transform: translateY(-50%);
  229. }
  230. &:hover {
  231. background-image: $subMenuHover !important;
  232. }
  233. }
  234. // the scroll bar appears when the subMenu is too long
  235. >.el-menu--popup {
  236. max-height: 100vh;
  237. overflow-y: auto;
  238. &::-webkit-scrollbar-track-piece {
  239. background: #d3dce6;
  240. }
  241. &::-webkit-scrollbar {
  242. width: 6px;
  243. }
  244. &::-webkit-scrollbar-thumb {
  245. background: #99a9bf;
  246. border-radius: 20px;
  247. }
  248. }
  249. }