app.scss 7.7 KB

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