app.scss 8.7 KB

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