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.

365 lines
6.9 KiB

8 months ago
  1. *,
  2. *:before,
  3. *:after {
  4. box-sizing: border-box;
  5. }
  6. body {
  7. font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  8. font-size: 12px;
  9. line-height: 1.15;
  10. color: #303133;
  11. background-color: #fff;
  12. }
  13. a {
  14. color: mix(#fff, $--color-primary, 20%);
  15. text-decoration: none;
  16. &:focus,
  17. &:hover {
  18. color: $--color-primary;
  19. text-decoration: underline;
  20. }
  21. }
  22. img {
  23. vertical-align: middle;
  24. }
  25. /* Utils
  26. ------------------------------ */
  27. .clearfix:before,
  28. .clearfix:after {
  29. content: " ";
  30. display: table;
  31. }
  32. .clearfix:after {
  33. clear: both;
  34. }
  35. /* Animation
  36. ------------------------------ */
  37. .fade-enter-active,
  38. .fade-leave-active {
  39. transition: opacity .5s;
  40. }
  41. .fade-enter,
  42. .fade-leave-to {
  43. opacity: 0;
  44. }
  45. /* Reset element-ui
  46. ------------------------------ */
  47. .site-wrapper {
  48. .el-pagination {
  49. margin-top: 15px;
  50. text-align: right;
  51. }
  52. }
  53. /* Layout
  54. ------------------------------ */
  55. .site-wrapper {
  56. position: relative;
  57. min-width: 1180px;
  58. }
  59. /* Sidebar fold
  60. ------------------------------ */
  61. .site-sidebar--fold {
  62. .site-navbar__header,
  63. .site-navbar__brand,
  64. .site-sidebar,
  65. .site-sidebar__inner,
  66. .el-menu.site-sidebar__menu {
  67. width: 64px;
  68. }
  69. .site-navbar__body,
  70. .site-content__wrapper {
  71. margin-left: 64px;
  72. }
  73. .site-navbar__brand {
  74. &-lg {
  75. display: none;
  76. }
  77. &-mini {
  78. display: inline-block;
  79. }
  80. }
  81. .site-sidebar,
  82. .site-sidebar__inner {
  83. overflow: initial;
  84. }
  85. .site-sidebar__menu-icon {
  86. margin-right: 0;
  87. font-size: 20px;
  88. }
  89. .site-content--tabs > .el-tabs > .el-tabs__header {
  90. left: 64px;
  91. }
  92. }
  93. // animation
  94. .site-navbar__header,
  95. .site-navbar__brand,
  96. .site-navbar__body,
  97. .site-sidebar,
  98. .site-sidebar__inner,
  99. .site-sidebar__menu.el-menu,
  100. .site-sidebar__menu-icon,
  101. .site-content__wrapper,
  102. .site-content--tabs > .el-tabs .el-tabs__header {
  103. transition: inline-block .3s, left .3s, width .3s, margin-left .3s, font-size .3s;
  104. }
  105. /* Navbar
  106. ------------------------------ */
  107. .site-navbar {
  108. position: fixed;
  109. top: 0;
  110. right: 0;
  111. left: 0;
  112. z-index: 1030;
  113. height: 50px;
  114. box-shadow: 0 2px 4px rgba(0, 0, 0, .08);
  115. background-color: $navbar--background-color;
  116. &--inverse {
  117. .site-navbar__body {
  118. background-color: transparent;
  119. }
  120. .el-menu {
  121. > .el-menu-item,
  122. > .el-submenu > .el-submenu__title {
  123. color: #fff;
  124. &:focus,
  125. &:hover {
  126. color: #fff;
  127. background-color: mix(#000, $navbar--background-color, 15%);
  128. }
  129. }
  130. > .el-menu-item.is-active,
  131. > .el-submenu.is-active > .el-submenu__title {
  132. border-bottom-color: mix(#fff, $navbar--background-color, 85%);
  133. }
  134. .el-menu-item i,
  135. .el-submenu__title i,
  136. .el-dropdown {
  137. color: #fff;
  138. }
  139. }
  140. .el-menu--popup-bottom-start {
  141. background-color: $navbar--background-color;
  142. }
  143. }
  144. &__header {
  145. position: relative;
  146. float: left;
  147. width: 230px;
  148. height: 50px;
  149. overflow: hidden;
  150. }
  151. &__brand {
  152. display: table-cell;
  153. vertical-align: middle;
  154. width: 230px;
  155. height: 50px;
  156. margin: 0;
  157. line-height: 50px;
  158. font-size: 20px;
  159. text-align: center;
  160. text-transform: uppercase;
  161. white-space: nowrap;
  162. color: #fff;
  163. &-lg,
  164. &-mini {
  165. margin: 0 5px;
  166. color: #fff;
  167. &:focus,
  168. &:hover {
  169. color: #fff;
  170. text-decoration: none;
  171. }
  172. }
  173. &-mini {
  174. display: none;
  175. }
  176. }
  177. &__switch {
  178. font-size: 18px;
  179. border-bottom: none !important;
  180. }
  181. &__avatar {
  182. border-bottom: none !important;
  183. * {
  184. vertical-align: inherit;
  185. }
  186. .el-dropdown-link {
  187. > img {
  188. width: 36px;
  189. height: auto;
  190. margin-right: 5px;
  191. border-radius: 100%;
  192. vertical-align: middle;
  193. }
  194. }
  195. }
  196. &__body {
  197. position: relative;
  198. margin-left: 230px;
  199. padding-right: 15px;
  200. background-color: #fff;
  201. }
  202. &__menu {
  203. float: left;
  204. background-color: transparent;
  205. border-bottom: 0;
  206. &--right {
  207. float: right;
  208. }
  209. a:focus,
  210. a:hover {
  211. text-decoration: none;
  212. }
  213. .el-menu-item,
  214. .el-submenu > .el-submenu__title {
  215. height: 50px;
  216. line-height: 50px;
  217. }
  218. .el-submenu > .el-menu {
  219. top: 55px;
  220. }
  221. .el-badge {
  222. display: inline;
  223. z-index: 2;
  224. &__content {
  225. line-height: 16px;
  226. }
  227. }
  228. }
  229. }
  230. /* Sidebar
  231. ------------------------------ */
  232. .site-sidebar {
  233. position: fixed;
  234. top: 50px;
  235. left: 0;
  236. bottom: 0;
  237. z-index: 1020;
  238. width: 230px;
  239. overflow: hidden;
  240. &--dark,
  241. &--dark-popper {
  242. background-color: $sidebar--background-color-dark;
  243. .site-sidebar__menu.el-menu,
  244. > .el-menu--popup {
  245. background-color: $sidebar--background-color-dark;
  246. .el-menu-item,
  247. .el-submenu > .el-submenu__title {
  248. color: $sidebar--color-text-dark;
  249. &:focus,
  250. &:hover {
  251. color: mix(#fff, $sidebar--color-text-dark, 50%);
  252. background-color: mix(#fff, $sidebar--background-color-dark, 2.5%);
  253. }
  254. }
  255. .el-menu,
  256. .el-submenu.is-opened {
  257. background-color: mix(#000, $sidebar--background-color-dark, 15%);
  258. }
  259. .el-menu-item.is-active,
  260. .el-submenu.is-active > .el-submenu__title {
  261. color: mix(#fff, $sidebar--color-text-dark, 80%);
  262. }
  263. }
  264. }
  265. &__inner {
  266. position: relative;
  267. z-index: 1;
  268. width: 250px; // 放出侧边滚动条
  269. height: 100%;
  270. padding-bottom: 15px;
  271. overflow-y: scroll;
  272. }
  273. &__menu.el-menu {
  274. width: 230px;
  275. border-right: 0;
  276. }
  277. &__menu-icon {
  278. width: 24px;
  279. margin-right: 5px;
  280. text-align: center;
  281. font-size: 12px;
  282. color: inherit !important;
  283. }
  284. }
  285. /* Content
  286. ------------------------------ */
  287. .site-content {
  288. position: relative;
  289. padding: 15px;
  290. &__wrapper {
  291. position: relative;
  292. padding-top: 50px;
  293. margin-left: 230px;
  294. min-height: 100%;
  295. background: $content--background-color;
  296. }
  297. &--tabs {
  298. padding: 55px 0 0;
  299. }
  300. > .el-tabs {
  301. > .el-tabs__header {
  302. position: fixed;
  303. top: 50px;
  304. left: 230px;
  305. right: 0;
  306. z-index: 930;
  307. padding: 0 55px 0 15px;
  308. box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .12), 0 0 6px 0 rgba(0, 0, 0, .04);
  309. background-color: #fff;
  310. > .el-tabs__nav-wrap {
  311. margin-bottom: 0;
  312. &:after {
  313. display: none;
  314. }
  315. }
  316. }
  317. > .el-tabs__content {
  318. padding: 0 15px 15px;
  319. > .site-tabs__tools {
  320. position: fixed;
  321. top: 50px;
  322. right: 0;
  323. z-index: 931;
  324. height: 40px;
  325. padding: 0 12px;
  326. font-size: 16px;
  327. line-height: 40px;
  328. background-color: $content--background-color;
  329. cursor: pointer;
  330. .el-icon--right {
  331. margin-left: 0;
  332. }
  333. }
  334. }
  335. }
  336. }
  337. .el-table__expand-icon {
  338. display: inline-block;
  339. width: 14px;
  340. vertical-align: middle;
  341. margin-right: 5px;
  342. }