app.scss 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  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-align-items-center{
  232. align-items: center;
  233. align-content: center;
  234. }
  235. /* cursor 鼠标形状
  236. ------------------------------- */
  237. // 默认
  238. .cursor-default {
  239. cursor: default !important;
  240. }
  241. // 帮助
  242. .cursor-help {
  243. cursor: help !important;
  244. }
  245. // 手指
  246. .cursor-pointer {
  247. cursor: pointer !important;
  248. }
  249. // 移动
  250. .cursor-move {
  251. cursor: move !important;
  252. }
  253. /* 宽高 100%
  254. ------------------------------- */
  255. .w100 {
  256. width: 100% !important;
  257. }
  258. .h100 {
  259. height: 100% !important;
  260. }
  261. .vh100 {
  262. height: 100vh !important;
  263. }
  264. .max100vh {
  265. max-height: 100vh !important;
  266. }
  267. .min100vh {
  268. min-height: 100vh !important;
  269. }
  270. /* 颜色值
  271. ------------------------------- */
  272. .color-primary {
  273. color: var(--el-color-primary);
  274. }
  275. .color-success {
  276. color: var(--el-color-success);
  277. }
  278. .color-warning {
  279. color: var(--el-color-warning);
  280. }
  281. .color-danger {
  282. color: var(--el-color-danger);
  283. }
  284. .color-info {
  285. color: var(--el-color-info);
  286. }
  287. //固定宽度
  288. @for $i from 0 through 30 {
  289. .wd#{$i*5} {
  290. width: #{$i*5}px !important;
  291. }
  292. }
  293. /* 字体大小全局样式
  294. ------------------------------- */
  295. @for $i from 10 through 32 {
  296. .font#{$i} {
  297. font-size: #{$i}px !important;
  298. }
  299. }
  300. /* 外边距、内边距全局样式
  301. ------------------------------- */
  302. @for $i from 1 through 35 {
  303. .mt#{$i} {
  304. margin-top: #{$i}px !important;
  305. }
  306. .mr#{$i} {
  307. margin-right: #{$i}px !important;
  308. }
  309. .mb#{$i} {
  310. margin-bottom: #{$i}px !important;
  311. }
  312. .ml#{$i} {
  313. margin-left: #{$i}px !important;
  314. }
  315. .pt#{$i} {
  316. padding-top: #{$i}px !important;
  317. }
  318. .pr#{$i} {
  319. padding-right: #{$i}px !important;
  320. }
  321. .pb#{$i} {
  322. padding-bottom: #{$i}px !important;
  323. }
  324. .pl#{$i} {
  325. padding-left: #{$i}px !important;
  326. }
  327. .pv#{$i}{
  328. padding: #{$i}px auto !important;
  329. }
  330. .ph#{$i}{
  331. padding: auto #{$i}px !important;
  332. }
  333. .pd#{$i}{
  334. padding: #{$i}px !important;
  335. }
  336. .mv#{$i}{
  337. margin: #{$i}px auto !important;
  338. }
  339. .mh#{$i}{
  340. margin: auto #{$i}px !important;
  341. }
  342. }
  343. .hc{
  344. visibility: hidden !important;
  345. transition: all 0.5s;
  346. }
  347. .hp{
  348. &:hover{
  349. .hc{
  350. visibility: visible !important;
  351. }
  352. }
  353. }
  354. .text-align-left{
  355. text-align: left;
  356. }
  357. .text-align-center{
  358. text-align: center;
  359. }
  360. .text-align-right{
  361. text-align: right;
  362. }
  363. .float-right{
  364. float: right;
  365. }
  366. .float-left{
  367. float: left;
  368. }
  369. .code{
  370. width: 100%;
  371. padding: 5px;
  372. margin: 5px;
  373. border-radius: 5px;
  374. background-color: #f5f7fa;
  375. color:#000;
  376. }
  377. .scroll_y{
  378. overflow-y: scroll;
  379. }