app.scss 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. /* 初始化样式
  2. ------------------------------- */
  3. * {
  4. margin: 0;
  5. padding: 0;
  6. box-sizing: border-box;
  7. outline: none !important;
  8. }
  9. :root {
  10. --next-color-white: #ffffff;
  11. --next-bg-main-color: #f8f8f8;
  12. --next-bg-color: #f5f5ff;
  13. --next-border-color-light: #f1f2f3;
  14. --next-color-primary-lighter: #ecf5ff;
  15. --next-color-success-lighter: #f0f9eb;
  16. --next-color-warning-lighter: #fdf6ec;
  17. --next-color-danger-lighter: #fef0f0;
  18. --next-color-dark-hover: #0000001a;
  19. --next-color-menu-hover: rgba(0, 0, 0, 0.2);
  20. --next-color-user-hover: rgba(0, 0, 0, 0.04);
  21. --next-color-seting-main: #e9eef3;
  22. --next-color-seting-aside: #d3dce6;
  23. --next-color-seting-header: #b3c0d1;
  24. }
  25. html,
  26. body,
  27. #app {
  28. margin: 0;
  29. padding: 0;
  30. width: 100%;
  31. height: 100%;
  32. font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
  33. font-weight: 400;
  34. -webkit-font-smoothing: antialiased;
  35. -webkit-tap-highlight-color: transparent;
  36. background-color: var(--next-bg-main-color);
  37. font-size: 14px;
  38. overflow: hidden;
  39. position: relative;
  40. }
  41. /* 主布局样式
  42. ------------------------------- */
  43. .layout-container {
  44. width: 100%;
  45. height: 100%;
  46. .layout-pd {
  47. padding: 15px !important;
  48. }
  49. .layout-flex {
  50. display: flex;
  51. flex-direction: column;
  52. flex: 1;
  53. }
  54. .layout-aside {
  55. background: var(--next-bg-menuBar);
  56. box-shadow: 2px 0 6px rgb(0 21 41 / 1%);
  57. height: inherit;
  58. position: relative;
  59. z-index: 1;
  60. display: flex;
  61. flex-direction: column;
  62. overflow-x: hidden !important;
  63. .el-scrollbar__view {
  64. overflow: hidden;
  65. }
  66. }
  67. .layout-header {
  68. padding: 0 !important;
  69. height: auto !important;
  70. }
  71. .layout-main {
  72. padding: 0 !important;
  73. overflow: hidden;
  74. width: 100%;
  75. background-color: var(--next-bg-main-color);
  76. display: flex;
  77. flex-direction: column;
  78. // 内层 el-scrollbar样式,用于界面高度自适应(main.vue)
  79. .layout-main-scroll {
  80. @extend .layout-flex;
  81. .layout-parent {
  82. @extend .layout-flex;
  83. position: relative;
  84. }
  85. }
  86. }
  87. // 用于界面高度自适应
  88. .layout-padding {
  89. @extend .layout-pd;
  90. position: absolute;
  91. left: 0;
  92. top: 0;
  93. height: 100%;
  94. width: 100%;
  95. overflow: hidden;
  96. @extend .layout-flex;
  97. &-auto {
  98. height: inherit;
  99. @extend .layout-flex;
  100. }
  101. &-view {
  102. background: var(--el-color-white);
  103. width: 100%;
  104. height: 100%;
  105. border-radius: 4px;
  106. border: 1px solid var(--el-border-color-light, #ebeef5);
  107. overflow: hidden;
  108. }
  109. }
  110. // 用于界面高度自适应,主视图区 main 的内边距,用于 iframe
  111. .layout-padding-unset {
  112. padding: 0 !important;
  113. &-view {
  114. border-radius: 0 !important;
  115. border: none !important;
  116. }
  117. }
  118. // 用于设置 iframe loading 时的高度(loading 垂直居中显示)
  119. .layout-iframe {
  120. .el-loading-parent--relative {
  121. height: 100%;
  122. }
  123. }
  124. .el-scrollbar {
  125. width: 100%;
  126. }
  127. .layout-el-aside-br-color {
  128. border-right: 1px solid var(--el-border-color-light, #ebeef5);
  129. }
  130. // pc端左侧导航样式
  131. .layout-aside-pc-220 {
  132. width: 220px !important;
  133. transition: width 0.3s ease;
  134. }
  135. .layout-aside-pc-64 {
  136. width: 64px !important;
  137. transition: width 0.3s ease;
  138. }
  139. .layout-aside-pc-1 {
  140. width: 1px !important;
  141. transition: width 0.3s ease;
  142. }
  143. // 手机端左侧导航样式
  144. .layout-aside-mobile {
  145. position: fixed;
  146. top: 0;
  147. left: -220px;
  148. width: 220px;
  149. z-index: 9999999;
  150. }
  151. .layout-aside-mobile-close {
  152. left: -220px;
  153. transition: all 0.3s cubic-bezier(0.39, 0.58, 0.57, 1);
  154. }
  155. .layout-aside-mobile-open {
  156. left: 0;
  157. transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  158. }
  159. .layout-aside-mobile-mode {
  160. position: fixed;
  161. top: 0;
  162. right: 0;
  163. bottom: 0;
  164. left: 0;
  165. height: 100%;
  166. background-color: rgba(0, 0, 0, 0.5);
  167. z-index: 9999998;
  168. animation: error-img 0.3s;
  169. }
  170. .layout-mian-height-50 {
  171. height: calc(100vh - 50px);
  172. }
  173. .layout-columns-warp {
  174. flex: 1;
  175. display: flex;
  176. overflow: hidden;
  177. }
  178. .layout-hide {
  179. display: none;
  180. }
  181. }
  182. /* element plus 全局样式
  183. ------------------------------- */
  184. .layout-breadcrumb-seting {
  185. .el-divider {
  186. background-color: rgb(230, 230, 230);
  187. }
  188. }
  189. /* nprogress 进度条跟随主题颜色
  190. ------------------------------- */
  191. #nprogress {
  192. .bar {
  193. background: var(--el-color-primary) !important;
  194. z-index: 9999999 !important;
  195. }
  196. }
  197. /* flex 弹性布局
  198. ------------------------------- */
  199. .flex {
  200. display: flex;
  201. }
  202. .flex-auto {
  203. flex: 1;
  204. overflow: hidden;
  205. }
  206. .flex-center {
  207. @extend .flex;
  208. flex-direction: column;
  209. width: 100%;
  210. overflow: hidden;
  211. }
  212. .flex-margin {
  213. margin: auto;
  214. }
  215. .flex-warp {
  216. display: flex;
  217. flex-wrap: wrap;
  218. align-content: flex-start;
  219. margin: 0 -5px;
  220. .flex-warp-item {
  221. padding: 5px;
  222. .flex-warp-item-box {
  223. width: 100%;
  224. height: 100%;
  225. }
  226. }
  227. }
  228. .flex-justify-center {
  229. justify-content: center;
  230. }
  231. .flex-justify-around {
  232. justify-content: space-around;
  233. }
  234. .flex-justify-between {
  235. justify-content: space-between;
  236. }
  237. .flex-align-items-center {
  238. align-items: center;
  239. align-content: center;
  240. }
  241. /* cursor 鼠标形状
  242. ------------------------------- */
  243. // 默认
  244. .cursor-default {
  245. cursor: default !important;
  246. }
  247. // 帮助
  248. .cursor-help {
  249. cursor: help !important;
  250. }
  251. // 手指
  252. .cursor-pointer {
  253. cursor: pointer !important;
  254. }
  255. // 移动
  256. .cursor-move {
  257. cursor: move !important;
  258. }
  259. // 禁用
  260. .cursor-disabled {
  261. cursor: not-allowed !important;
  262. }
  263. /* 宽高 100%
  264. ------------------------------- */
  265. .w100 {
  266. width: 100% !important;
  267. }
  268. .h100 {
  269. height: 100% !important;
  270. }
  271. .vh100 {
  272. height: 100vh !important;
  273. }
  274. .max100vh {
  275. max-height: 100vh !important;
  276. }
  277. .min100vh {
  278. min-height: 100vh !important;
  279. }
  280. .wd100 {
  281. width: 100px !important;
  282. }
  283. .wd150 {
  284. width: 150px !important;
  285. }
  286. .wd200 {
  287. width: 200px !important;
  288. }
  289. /* 颜色值
  290. ------------------------------- */
  291. .color-primary {
  292. color: var(--el-color-primary);
  293. }
  294. .color-success {
  295. color: var(--el-color-success);
  296. }
  297. .color-warning {
  298. color: var(--el-color-warning);
  299. }
  300. .color-danger {
  301. color: var(--el-color-danger);
  302. }
  303. .color-info {
  304. color: var(--el-color-info);
  305. }
  306. //固定宽度
  307. @for $i from 0 through 30 {
  308. .wd#{$i*5} {
  309. width: #{$i*5}px !important;
  310. }
  311. }
  312. /* 字体大小全局样式
  313. ------------------------------- */
  314. @for $i from 10 through 32 {
  315. .font#{$i} {
  316. font-size: #{$i}px !important;
  317. }
  318. }
  319. /* 外边距、内边距全局样式
  320. ------------------------------- */
  321. @for $i from 1 through 35 {
  322. .mt#{$i} {
  323. margin-top: #{$i}px !important;
  324. }
  325. .mr#{$i} {
  326. margin-right: #{$i}px !important;
  327. }
  328. .mb#{$i} {
  329. margin-bottom: #{$i}px !important;
  330. }
  331. .ml#{$i} {
  332. margin-left: #{$i}px !important;
  333. }
  334. .pt#{$i} {
  335. padding-top: #{$i}px !important;
  336. }
  337. .pr#{$i} {
  338. padding-right: #{$i}px !important;
  339. }
  340. .pb#{$i} {
  341. padding-bottom: #{$i}px !important;
  342. }
  343. .pl#{$i} {
  344. padding-left: #{$i}px !important;
  345. }
  346. .pv#{$i} {
  347. padding: #{$i}px auto !important;
  348. }
  349. .ph#{$i} {
  350. padding: auto #{$i}px !important;
  351. }
  352. .pd#{$i} {
  353. padding: #{$i}px !important;
  354. }
  355. .mv#{$i} {
  356. margin: #{$i}px auto !important;
  357. }
  358. .mh#{$i} {
  359. margin: auto #{$i}px !important;
  360. }
  361. }
  362. .hc {
  363. visibility: hidden !important;
  364. transition: all 0.5s;
  365. }
  366. .hp {
  367. &:hover {
  368. .hc {
  369. visibility: visible !important;
  370. }
  371. }
  372. }
  373. .text-align-left {
  374. text-align: left;
  375. }
  376. .text-align-center {
  377. text-align: center;
  378. }
  379. .text-align-right {
  380. text-align: right;
  381. }
  382. .float-right {
  383. float: right;
  384. }
  385. .float-left {
  386. float: left;
  387. }
  388. .code {
  389. width: 100%;
  390. padding: 5px;
  391. margin: 5px;
  392. border-radius: 5px;
  393. background-color: #f5f7fa;
  394. color: #000;
  395. }
  396. .scroll_y {
  397. overflow-y: scroll;
  398. }