element.scss 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732
  1. //饿了么UI组件的样式重绘
  2. .el-button[block] {
  3. width: 100%;
  4. }
  5. .el-button .hc-icon-i {
  6. margin-right: 4px;
  7. }
  8. .el-button.is-loading .hc-icon-i {
  9. display: none;
  10. }
  11. //主色
  12. .el-button--primary.is-link,
  13. .el-button--primary.is-plain,
  14. .el-button--primary.is-text {
  15. --el-button-border-color: transparent;
  16. --el-button-hover-text-color: var(--el-color-primary);
  17. --el-button-hover-bg-color: var(--el-color-primary-light-8);
  18. --el-button-hover-border-color: transparent;
  19. }
  20. //红色
  21. .el-button--danger.is-link,
  22. .el-button--danger.is-plain,
  23. .el-button--danger.is-text {
  24. --el-button-border-color: transparent;
  25. --el-button-hover-text-color: var(--el-color-danger);
  26. --el-button-hover-bg-color: var(--el-color-danger-light-8);
  27. --el-button-hover-border-color: transparent;
  28. }
  29. //绿色
  30. .el-button--success.is-link,
  31. .el-button--success.is-plain,
  32. .el-button--success.is-text {
  33. --el-button-border-color: transparent;
  34. --el-button-hover-text-color: var(--el-color-success);
  35. --el-button-hover-bg-color: var(--el-color-success-light-8);
  36. --el-button-hover-border-color: transparent;
  37. }
  38. .el-button + .el-button {
  39. margin-left: 20px;
  40. }
  41. .el-button--small + .el-button--small {
  42. margin-left: 5px;
  43. }
  44. //单选框、多选框
  45. .el-checkbox.size-xl, .el-radio.size-xl {
  46. height: auto;
  47. .el-checkbox__inner, .el-radio__inner {
  48. width: 18px;
  49. height: 18px;
  50. }
  51. .el-checkbox__label, .el-radio__label {
  52. font-size: 14px;
  53. font-weight: 400;
  54. line-height: 1.4;
  55. }
  56. &.space .el-checkbox__label,
  57. &.space .el-radio__label {
  58. white-space: initial;
  59. }
  60. .el-checkbox__inner::after {
  61. height: 10px;
  62. left: 6px;
  63. top: 1px;
  64. }
  65. .el-checkbox__input.is-indeterminate .el-checkbox__inner::before {
  66. top: 7px;
  67. }
  68. .el-radio__inner::after {
  69. width: 8px;
  70. height: 8px;
  71. }
  72. }
  73. //消息提示
  74. .el-message {
  75. --el-message-padding: 10px 20px;
  76. border: 0;
  77. box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.012), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
  78. }
  79. //按钮重绘
  80. .el-button[hc-btn] {
  81. border-radius: 6px;
  82. padding: 8px 20px;
  83. font-weight: 400;
  84. height: 40px;
  85. border: 1px solid #f1f5f8;
  86. box-shadow: var(--hc-shadow);
  87. &.el-button--small {
  88. height: 26px;
  89. padding: 5px 11px;
  90. font-size: 12px;
  91. border-radius: 4px;
  92. }
  93. &[_icon] .hc-icon-i {
  94. margin-right: 0;
  95. }
  96. &[_icon].el-button--small {
  97. height: 28px;
  98. width: 28px;
  99. padding: 3px;
  100. font-size: 20px;
  101. border-radius: 4px;
  102. }
  103. &[text-white] {
  104. --el-button-text-color: white !important;
  105. --el-button-hover-text-color: white !important;
  106. }
  107. &.el-button--primary {
  108. background: linear-gradient(to right, var(--el-color-primary-light-5), var(--el-color-primary), var(--el-color-primary-dark-2));
  109. background-size: 200%;
  110. transition: background-position .5s;
  111. &:hover {
  112. background-position: 100% 0;
  113. }
  114. }
  115. &.is-loading:not([class*='el-button--']) {
  116. --el-button-bg-color: #f3f3f3;
  117. --el-button-text-color: #8c9099;
  118. }
  119. &.is-disabled:not([class*='el-button--']) {
  120. --el-button-disabled-text-color: #bfbfbf;
  121. --el-button-disabled-bg-color: #f3f3f3;
  122. }
  123. &:not([class*='el-button--']) {
  124. --el-button-bg-color: #f1f5f8;
  125. --el-button-text-color: #838791;
  126. --el-button-hover-text-color: #838791;
  127. --el-button-active-text-color: #838791;
  128. --el-button-hover-bg-color: var(--el-color-primary-light-9);
  129. --el-button-active-bg-color: var(--el-color-primary-light-8);
  130. }
  131. &.el-button--primary.is-plain {
  132. --el-button-text-color: var(--el-color-primary);
  133. --el-button-bg-color: var(--el-color-primary-light-9);
  134. --el-button-hover-text-color: var(--el-color-primary);
  135. --el-button-hover-bg-color: var(--el-color-primary-light-8);
  136. --el-button-active-text-color: var(--el-color-primary);
  137. --el-button-active-bg-color: var(--el-color-primary-light-7);
  138. }
  139. &.is-disabled, &.is-disabled:focus, &.is-disabled:hover {
  140. color: var(--el-button-disabled-text-color);
  141. cursor: not-allowed;
  142. background-image: none;
  143. background-color: var(--el-button-disabled-bg-color);
  144. border-color: var(--el-button-disabled-border-color);
  145. }
  146. }
  147. //表单
  148. .el-form {
  149. position: relative;
  150. overflow: hidden;
  151. .hc-form-item {
  152. position: relative;
  153. display: flex;
  154. .el-form-item {
  155. flex: 1;
  156. margin-right: 24px;
  157. }
  158. .el-form-item + .el-form-item {
  159. margin-left: 24px;
  160. }
  161. .el-form-item:last-child {
  162. margin-right: 0;
  163. }
  164. }
  165. .hc-form-item-w {
  166. position: relative;
  167. width: 100%;
  168. }
  169. &.el-form--label-top .hc-form-item .el-form-item .el-form-item__label {
  170. position: relative;
  171. .solt-label {
  172. position: relative;
  173. width: calc(100% - 50px);
  174. }
  175. .solt-extra {
  176. position: absolute;
  177. right: 0;
  178. top: 0;
  179. }
  180. }
  181. }
  182. //滚动条
  183. .el-scrollbar {
  184. overflow: initial;
  185. .el-scrollbar__bar.is-vertical {
  186. //right: -16px;
  187. }
  188. .el-scrollbar__bar.is-horizontal {
  189. //bottom: -20px;
  190. }
  191. }
  192. .el-date-editor.el-input.block,
  193. .el-date-editor.block .el-input__wrapper {
  194. width: 100%;
  195. }
  196. .el-autocomplete.block {
  197. width: 100%;
  198. }
  199. //个人中心项目列表
  200. .hc-project-menu.el-menu {
  201. --el-menu-level: 0;
  202. background-color: initial;
  203. border: initial;
  204. .el-sub-menu {
  205. border: 1px solid #e9e9e9;
  206. border-radius: 3px;
  207. margin-bottom: 20px;
  208. .el-sub-menu__title .hc-menu-icon {
  209. font-size: 20px;
  210. margin-right: 10px;
  211. }
  212. &.is-opened .el-sub-menu__title {
  213. color: var(--el-color-primary);
  214. background-color: var(--el-color-primary-light-8);
  215. }
  216. .el-menu {
  217. background-color: initial;
  218. }
  219. .el-menu-item {
  220. padding-left: 50px;
  221. }
  222. }
  223. .el-menu-item.is-active {
  224. color: var(--el-menu-active-color);
  225. background-color: var(--el-color-primary-light-9);
  226. .hc-menu-icon {
  227. position: absolute;
  228. font-size: 16px;
  229. left: 22px;
  230. }
  231. }
  232. }
  233. //表格
  234. .el-table[hc] {
  235. --el-table-bg-color: initial;
  236. --el-table-header-bg-color: #DAE8F3;
  237. --el-table-header-text-color: #50545E;
  238. --el-table-tr-bg-color: #F1F5F8;
  239. --el-fill-color-lighter: #E7EEF4;
  240. --el-table-text-color: #666666;
  241. --el-table-row-hover-bg-color: var(--el-color-primary-light-9);
  242. th.el-table__cell>.cell {
  243. font-weight: 400;
  244. }
  245. .el-table__cell {
  246. padding: 12px 0;
  247. .el-checkbox {
  248. --el-checkbox-input-height: 18px;
  249. --el-checkbox-input-width: 18px;
  250. --el-checkbox-font-size: 16px;
  251. --el-checkbox-border-radius: 3px;
  252. .el-checkbox__inner::after {
  253. top: 3px;
  254. left: 6px;
  255. }
  256. }
  257. .el-checkbox__input.is-indeterminate .el-checkbox__inner::before {
  258. top: 7px;
  259. }
  260. }
  261. &.el-table--border {
  262. --el-table-border-color: #dbdbdb;
  263. }
  264. }
  265. .el-table[hc]:not([class*='el-table--border']) {
  266. .el-table__inner-wrapper::before {
  267. background-color: transparent;
  268. }
  269. }
  270. //下拉框
  271. .el-select[block] {
  272. width: 100%;
  273. }
  274. //工单服务的时间轴
  275. .time-line-box .el-timeline.hc-time-line {
  276. padding-left: 5px;
  277. padding-top: 5px;
  278. .el-timeline-item {
  279. padding-bottom: 24px;
  280. .el-timeline-item__tail {
  281. top: 28px;
  282. left: 6px;
  283. height: calc(100% - 36px);
  284. border-width: 1px;
  285. border-color: #838791;
  286. }
  287. .el-timeline-item__node {
  288. display: none;
  289. }
  290. .el-timeline-item__wrapper {
  291. padding-left: 38px;
  292. .el-timeline-item__content {
  293. .timeline-item-icon {
  294. position: absolute;
  295. width: 24px;
  296. height: 24px;
  297. left: -5px;
  298. border: 1px solid #838791;
  299. border-radius: 50px;
  300. display: flex;
  301. justify-content: center;
  302. align-items: center;
  303. color: #838791;
  304. .check-icon {
  305. font-size: 18px;
  306. }
  307. }
  308. .reply-name {
  309. color: #838791;
  310. font-size: 18px;
  311. }
  312. .reply-content {
  313. color: #838791;
  314. margin-top: 5px;
  315. }
  316. }
  317. }
  318. &.success {
  319. .el-timeline-item__tail {
  320. border-color: var(--el-color-primary);
  321. }
  322. .el-timeline-item__wrapper .el-timeline-item__content .timeline-item-icon {
  323. color: var(--el-color-primary);
  324. border: 1px solid var(--el-color-primary);
  325. }
  326. }
  327. &.primary {
  328. .el-timeline-item__wrapper .el-timeline-item__content {
  329. .reply-name {
  330. color: #1A1A1A;
  331. }
  332. .timeline-item-icon {
  333. background-color: var(--el-color-primary);
  334. border: 1px solid var(--el-color-primary);
  335. color: #ffffff;
  336. }
  337. }
  338. }
  339. }
  340. }
  341. //滚动条
  342. /*.el-scrollbar {
  343. scroll-behavior: smooth;
  344. .el-scrollbar__wrap--hidden-default {
  345. scroll-behavior: smooth;
  346. }
  347. }*/
  348. //弹窗
  349. .el-overlay-dialog {
  350. .el-dialog.hc-modal-border {
  351. .el-dialog__header {
  352. padding-bottom: var(--el-dialog-padding-primary);
  353. border-bottom: 1px solid #EEEEEE;
  354. margin-right: 0;
  355. }
  356. .el-dialog__footer {
  357. border-top: 1px solid #EEEEEE;
  358. padding-top: var(--el-dialog-padding-primary);
  359. }
  360. }
  361. .el-dialog.hc-modal-nop {
  362. .el-dialog__body {
  363. padding: 0;
  364. }
  365. }
  366. }
  367. //上传
  368. .el-upload-list.el-upload-list--picture-card {
  369. --el-upload-list-picture-card-size: 88px;
  370. .el-upload--picture-card {
  371. --el-upload-picture-card-size: 88px;
  372. .hc-upload-icon {
  373. font-size: 39px;
  374. }
  375. }
  376. }
  377. //头像
  378. .el-avatar {
  379. color: initial !important;
  380. background: initial !important;
  381. }
  382. //表格
  383. .hc-table-ref-box {
  384. position: relative;
  385. display: inline-grid;
  386. border: 1px solid #dbdbdb;
  387. width: 100%;
  388. &.no-border {
  389. border: 0;
  390. }
  391. }
  392. //naiveui 鼠标右键菜单的图标
  393. .n-dropdown-menu .n-dropdown-option .n-dropdown-option-body .n-dropdown-option-body__prefix.n-dropdown-option-body__prefix--show-icon {
  394. font-size: 22px;
  395. }
  396. //树
  397. // .el-tree .el-tree-node__children{
  398. // overflow: visible!important;
  399. // }
  400. .el-tree.hc-tree-node {
  401. --el-fill-color-blank: transparent;
  402. --el-tree-node-hover-bg-color: var(--el-color-primary-light-9);
  403. --el-tree-text-color: #50545E;
  404. --el-tree-expand-icon-color: #838791;
  405. background: var(--el-fill-color-blank);
  406. color: var(--el-tree-text-color);
  407. .el-tree-node__content {
  408. border-radius: 2px;
  409. }
  410. &.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
  411. background-color: var(--el-color-primary-light-7);
  412. }
  413. .el-tree-node__expand-icon {
  414. font-size: 16px;
  415. }
  416. .el-tree-node__children{
  417. overflow: visible!important;
  418. }
  419. }
  420. //弹窗提示
  421. .el-dialog .el-dialog__body {
  422. position: relative;
  423. max-height: 60vh;
  424. overflow: auto;
  425. .el-alert {
  426. margin-top: -10px;
  427. margin-bottom: 20px;
  428. }
  429. }
  430. .el-dialog.hc-modal-table .el-dialog__body {
  431. height: 60vh;
  432. }
  433. //上传文件列表
  434. .hc-upload-border {
  435. .hc-upload-loading {
  436. position: relative;
  437. }
  438. .el-upload-list {
  439. border-top: 1px solid #f1f1f1;
  440. margin-top: 24px;
  441. padding-top: 24px;
  442. }
  443. }
  444. //表单上传组件
  445. .hc-upload-table-form {
  446. position: relative;
  447. height: 100%;
  448. display: flex;
  449. justify-content: center;
  450. align-items: center;
  451. .el-upload {
  452. position: relative;
  453. flex: 1;
  454. height: 100%;
  455. color: #ccc;
  456. display: flex;
  457. justify-content: center;
  458. align-items: center;
  459. .hc-table-form-icon {
  460. font-size: 24px;
  461. font-weight: 100;
  462. }
  463. .hc-table-form-img {
  464. width: 100%;
  465. height: 100%;
  466. }
  467. }
  468. }
  469. //伪表单
  470. .el-form-item--large .el-form-item__content {
  471. .form-item-div, .form-item-dashed {
  472. position: relative;
  473. color: #606266;
  474. font-size: 14px;
  475. padding: 0 12px;
  476. height: 40px;
  477. width: 100%;
  478. border-radius: 4px;
  479. display: flex;
  480. align-items: center;
  481. .el-radio-group {
  482. .el-radio {
  483. margin-right: 0;
  484. }
  485. .el-radio + .el-radio {
  486. margin-left: 30px;
  487. }
  488. }
  489. &.hover{
  490. cursor: pointer;
  491. transition: border 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)
  492. }
  493. }
  494. .form-item-div {
  495. border: 1px solid #dddfe6;
  496. }
  497. .form-item-dashed {
  498. border: 1px dashed #dddfe6;
  499. }
  500. .form-item-div.hover, .form-item-dashed.hover {
  501. &:hover {
  502. border-color: var(--el-color-primary);
  503. }
  504. }
  505. }
  506. //无名称
  507. .el-form-item[no-label] .el-form-item__label-wrap {
  508. margin-left: 0 !important;
  509. }
  510. .el-form--large.el-form--label-top .el-form-item .el-form-item__label {
  511. min-height: 22px;
  512. }
  513. .el-form-item--large.mb-0 {
  514. margin-bottom: 0;
  515. }
  516. //输入框验证问题
  517. .el-input.is-error .el-input__wrapper {
  518. box-shadow: 0 0 0 1px var(--el-color-danger) inset;
  519. }
  520. //表单输入框和按钮组合
  521. .el-form-item.hc-input-button-group .el-form-item__content {
  522. .el-input {
  523. flex: 1;
  524. .el-input__wrapper {
  525. border-radius: 4px 0 0 4px;
  526. }
  527. }
  528. .el-button {
  529. border-radius: 0 4px 4px 0;
  530. }
  531. }
  532. //设置表单的上传
  533. .hc-upload-table-form {
  534. position: relative;
  535. height: 100%;
  536. display: flex;
  537. justify-content: center;
  538. align-items: center;
  539. .el-upload {
  540. position: relative;
  541. flex: 1;
  542. height: inherit;
  543. color: #ccc;
  544. .hc-table-form-icon {
  545. font-size: 24px;
  546. font-weight: 100;
  547. }
  548. .hc-table-form-img {
  549. width: 100%;
  550. height: inherit;
  551. }
  552. .hc-table-form-del {
  553. position: absolute;
  554. right: 0;
  555. top: 0;
  556. }
  557. }
  558. }
  559. //表单提示样式
  560. .el-popper.is-customized {
  561. padding: 6px 12px;
  562. background: linear-gradient(90deg, rgb(159, 229, 151), rgb(204, 229, 129));
  563. }
  564. .el-popper.is-customized .el-popper__arrow::before {
  565. background: linear-gradient(45deg, #b2e68d, #bce689);
  566. right: 0;
  567. }
  568. // 树样式
  569. .hc-tree-node {
  570. width: 100%;
  571. .data-custom-tree-node {
  572. position: relative;
  573. display: flex;
  574. align-items: center;
  575. width: 100%;
  576. color: var(--el-text-color-primary);
  577. .label {
  578. flex: auto;
  579. font-size: 16px;
  580. }
  581. .label.level-name {
  582. font-size: 16px;
  583. font-weight: bold;
  584. }
  585. }
  586. .el-tree-node__content {
  587. height: 28px;
  588. }
  589. .el-tree-node__label {
  590. flex: 1;
  591. user-select: none;
  592. }
  593. &.tree-line .el-tree-node.is-expanded.is-current.is-focusable {
  594. background: #cacaca;
  595. border-radius: 4px;
  596. }
  597. }
  598. .ui-drag-modal-box .hc-image-preview-box.ui-drag-modal-dialog .ui-drag-modal-dialog-body {
  599. .hc-image-preview-view {
  600. position: relative;
  601. overflow: hidden;
  602. height: 100%;
  603. width: 100%;
  604. .el-image-viewer__wrapper {
  605. position: relative;
  606. width: 100%;
  607. height: 100%;
  608. .el-image-viewer__mask {
  609. border-radius: 3px;
  610. box-shadow: 0 0 6px 0 rgba(0,0,0,0.10);
  611. }
  612. .el-image-viewer__close {
  613. display: none;
  614. }
  615. .el-image-viewer__actions {
  616. bottom: 10px;
  617. }
  618. }
  619. }
  620. }
  621. //下拉框的滚动条
  622. .el-select__popper.el-popper .el-select-dropdown .el-scrollbar .el-scrollbar__bar.is-vertical {
  623. right: 1px;
  624. }
  625. //设置表单样式
  626. .hc-excel-table-form-view {
  627. position: relative;
  628. display: flex;
  629. justify-content: center;
  630. td {
  631. padding: 6px;
  632. font-family: "EUDC", 宋体, v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;
  633. .el-input {
  634. background-color: #ffffff !important;
  635. border-radius: 3px;
  636. color: #606266;
  637. .el-input__wrapper {
  638. background-color: inherit;
  639. caret-color: var(--el-color-primary);
  640. }
  641. }
  642. .el-textarea {
  643. width: 100%;
  644. height: 100%;
  645. .el-textarea__inner {
  646. min-height: initial !important;
  647. background-color: #ffffff;
  648. border-radius: 3px;
  649. color: #606266;
  650. height: 100%;
  651. caret-color: var(--el-color-primary);
  652. }
  653. }
  654. //日期选择框
  655. .el-date-editor.el-input .el-input__wrapper,
  656. .el-date-editor.el-date-editor--datetimerange.el-input__wrapper {
  657. height: 100%;
  658. width: 100%;
  659. }
  660. //焦点
  661. .el-input .el-input__wrapper.is-focus, .el-input .el-input__wrapper:hover,
  662. .el-textarea .el-textarea__inner:hover {
  663. box-shadow: 0 0 0 1.5px var(--el-input-focus-border-color) inset;
  664. background-color: #eddac4;
  665. }
  666. //公式
  667. &[gscolor] {
  668. .el-input, .el-textarea .el-textarea__inner {
  669. background-color: #dcdcdc !important;
  670. }
  671. }
  672. //文本选中颜色
  673. .el-input .el-input__wrapper input,
  674. .el-textarea textarea {
  675. &::selection{
  676. background: var(--el-color-primary-light-9);
  677. color: var(--el-color-primary);
  678. }
  679. &::-moz-selection {
  680. background: var(--el-color-primary-light-9);
  681. color: var(--el-color-primary);
  682. }
  683. }
  684. }
  685. //非输入框颜色
  686. td:not([titlexx]), td[titlexx*=''],
  687. td:not([title]), td[title*=''] {
  688. background-color: #f1f5f8 !important;
  689. }
  690. }