element-plus.scss 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. .el-form-item__label {
  2. font-size: 13px !important;
  3. font-weight: 600 !important;
  4. // border:1px solid red;
  5. }
  6. .el-breadcrumb__inner,
  7. .el-breadcrumb__inner a {
  8. font-weight: 400 !important;
  9. }
  10. .el-dropdown-menu {
  11. padding: 0 !important;
  12. }
  13. .is-dark {
  14. z-index: 9999 !important;
  15. }
  16. /* 重置 el-button 中 icon 的 margin */
  17. .reset-margin [class*="el-icon"] + span {
  18. margin-left: 2px !important;
  19. }
  20. /* 自定义 popover 的类名 */
  21. .pure-popper {
  22. padding: 0 !important;
  23. }
  24. /* nprogress 适配 element-plus 的主题色 */
  25. #nprogress {
  26. & .bar {
  27. background-color: var(--el-color-primary) !important;
  28. }
  29. & .peg {
  30. box-shadow:
  31. 0 0 10px var(--el-color-primary),
  32. 0 0 5px var(--el-color-primary) !important;
  33. }
  34. & .spinner-icon {
  35. border-top-color: var(--el-color-primary);
  36. border-left-color: var(--el-color-primary);
  37. }
  38. }
  39. .pure-dialog {
  40. .el-dialog__header.show-close {
  41. padding-right: 16px;
  42. }
  43. .el-dialog__headerbtn {
  44. top: 16px;
  45. right: 12px;
  46. width: 24px;
  47. height: 24px;
  48. }
  49. .pure-dialog-svg {
  50. color: var(--el-color-info);
  51. }
  52. .el-dialog__footer {
  53. padding-top: 0;
  54. }
  55. }
  56. /* 全局覆盖element-plus的el-tour、el-dialog、el-drawer、el-message-box、el-notification组件右上角关闭图标和el-upload上传文件列表右侧关闭图标的样式,表现更鲜明 */
  57. .el-dialog__headerbtn,
  58. .el-message-box__headerbtn {
  59. &:hover {
  60. .el-dialog__close {
  61. color: var(--el-color-info) !important;
  62. }
  63. }
  64. }
  65. .el-icon {
  66. &.el-tour__close,
  67. &.el-dialog__close,
  68. &.el-drawer__close,
  69. &.el-message-box__close,
  70. &.el-notification__closeBtn,
  71. .el-upload-list__item.is-ready &.el-icon--close {
  72. width: 24px;
  73. height: 24px;
  74. border-radius: 4px;
  75. outline: none;
  76. transition:
  77. background-color 0.2s,
  78. color 0.2s;
  79. &:hover {
  80. color: rgb(0 0 0 / 88%) !important;
  81. text-decoration: none;
  82. background-color: rgb(0 0 0 / 6%);
  83. .pure-dialog-svg {
  84. color: rgb(0 0 0 / 88%) !important;
  85. }
  86. }
  87. }
  88. }
  89. /* 克隆并自定义 ElMessage 样式,不会影响 ElMessage 原本样式,在 src/utils/message.ts 中调用自定义样式 ElMessage 方法即可,整体暗色风格在 src/style/dark.scss 文件进行了适配 */
  90. .pure-message {
  91. background: #fff !important;
  92. border-width: 0 !important;
  93. box-shadow:
  94. 0 3px 6px -4px #0000001f,
  95. 0 6px 16px #00000014,
  96. 0 9px 28px 8px #0000000d !important;
  97. & .el-message__content {
  98. color: #000000d9 !important;
  99. pointer-events: all !important;
  100. background-image: initial !important;
  101. }
  102. & .el-message__closeBtn {
  103. border-radius: 4px;
  104. outline: none;
  105. transition:
  106. background-color 0.2s,
  107. color 0.2s;
  108. &:hover {
  109. background-color: rgb(0 0 0 / 6%);
  110. }
  111. }
  112. }
  113. /* 自定义菜单搜索样式 */
  114. .pure-search-dialog {
  115. @media screen and (width > 760px) and (width <= 940px) {
  116. .el-input__inner {
  117. font-size: 12px;
  118. }
  119. }
  120. @media screen and (width <= 470px) {
  121. .el-input__inner {
  122. font-size: 12px;
  123. }
  124. }
  125. .el-dialog__header {
  126. display: none;
  127. }
  128. .el-input__inner {
  129. font-size: 1.2em;
  130. }
  131. .el-dialog__footer {
  132. width: calc(100% + 32px);
  133. padding: 10px 20px;
  134. margin: auto -16px -16px;
  135. box-shadow:
  136. 0 -1px 0 0 #e0e3e8,
  137. 0 -3px 6px 0 rgb(69 98 155 / 12%);
  138. }
  139. }
  140. /* 仿 el-scrollbar 滚动条样式,支持大多数浏览器,如Chrome、Edge、Firefox、Safari等。整体暗色风格在 src/style/dark.scss 文件进行了适配 */
  141. .pure-scrollbar {
  142. /* Firefox */
  143. scrollbar-width: thin; /* 可选值为 'auto', 'thin', 'none' */
  144. scrollbar-color: rgb(221 222 224) transparent; /* 滑块颜色、轨道颜色 */
  145. ::-webkit-scrollbar {
  146. width: 6px; /* 滚动条宽度 */
  147. }
  148. /* 滚动条轨道 */
  149. ::-webkit-scrollbar-track {
  150. background: transparent; /* 轨道颜色 */
  151. }
  152. /* 滚动条滑块 */
  153. ::-webkit-scrollbar-thumb {
  154. background-color: rgb(221 222 224);
  155. border-radius: 4px;
  156. }
  157. /* 滚动条滑块:hover状态 */
  158. ::-webkit-scrollbar-thumb:hover {
  159. background: rgb(199 201 203); /* 滑块hover颜色 */
  160. }
  161. }