element.scss 18 KB

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