element-plus.scss 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. .el-breadcrumb__inner,
  2. .el-breadcrumb__inner a {
  3. font-weight: 400 !important;
  4. }
  5. el-text {
  6. display: flex;
  7. justify-content: center;
  8. align-items: center;
  9. .el-icon {
  10. margin-right: 4px;
  11. }
  12. }
  13. .el-upload {
  14. input[type="file"] {
  15. display: none !important;
  16. }
  17. }
  18. .el-upload__input {
  19. display: none;
  20. }
  21. .upload-container {
  22. .el-upload {
  23. width: 100%;
  24. .el-upload-dragger {
  25. width: 100%;
  26. height: 200px;
  27. }
  28. }
  29. }
  30. .el-dropdown-menu {
  31. padding: 0 !important;
  32. }
  33. .el-range-separator {
  34. box-sizing: content-box;
  35. }
  36. .is-dark {
  37. z-index: 9999 !important;
  38. }
  39. /* 重置 el-button 中 icon 的 margin */
  40. .reset-margin [class*="el-icon"] + span {
  41. margin-left: 2px !important;
  42. }
  43. .edit-btn {
  44. width: 100%;
  45. }
  46. /* 自定义 popover 的类名 */
  47. .pure-popper {
  48. padding: 0 !important;
  49. }
  50. /* 移动端翻页兼容 */
  51. .el-pagination {
  52. flex-flow: wrap !important;
  53. }
  54. /* 自定义 tooltip 的类名 */
  55. .pure-tooltip {
  56. // 右侧操作面板right-panel类名的z-index为40000,tooltip需要大于它才能显示
  57. z-index: 41000 !important;
  58. }
  59. /* nprogress 适配 element-plus 的主题色 */
  60. #nprogress {
  61. & .bar {
  62. background-color: var(--el-color-primary) !important;
  63. }
  64. & .peg {
  65. box-shadow: 0 0 10px var(--el-color-primary),
  66. 0 0 5px var(--el-color-primary) !important;
  67. }
  68. & .spinner-icon {
  69. border-top-color: var(--el-color-primary);
  70. border-left-color: var(--el-color-primary);
  71. }
  72. }
  73. /* 全局覆盖element-plus的el-dialog、el-drawer、el-message-box、el-notification组件右上角关闭图标的样式,表现更鲜明 */
  74. .el-dialog__headerbtn,
  75. .el-message-box__headerbtn {
  76. &:hover {
  77. .el-dialog__close {
  78. color: var(--el-color-info) !important;
  79. }
  80. }
  81. }
  82. .el-icon {
  83. &.el-dialog__close,
  84. &.el-drawer__close,
  85. &.el-message-box__close,
  86. &.el-notification__closeBtn {
  87. width: 24px;
  88. height: 24px;
  89. outline: none;
  90. border-radius: 4px;
  91. transition: background-color 0.2s, color 0.2s;
  92. &:hover {
  93. color: rgba(0, 0, 0, 0.88) !important;
  94. background-color: rgba(0, 0, 0, 0.06);
  95. text-decoration: none;
  96. }
  97. }
  98. }
  99. /* 克隆并自定义 ElMessage 样式,不会影响 ElMessage 原本样式,在 src/utils/message.ts 中调用自定义样式 ElMessage 方法即可,暗黑模式在 src/style/dark.scss 文件进行了适配 */
  100. .pure-message {
  101. border-width: 0 !important;
  102. background: #fff !important;
  103. padding: 10px 13px !important;
  104. box-shadow: 0 3px 6px -4px #0000001f, 0 6px 16px #00000014,
  105. 0 9px 28px 8px #0000000d !important;
  106. &.el-message.is-closable .el-message__content {
  107. padding-right: 17px !important;
  108. }
  109. & .el-message__content {
  110. color: #000000d9 !important;
  111. pointer-events: all !important;
  112. background-image: initial !important;
  113. }
  114. & .el-message__icon {
  115. margin-right: 8px !important;
  116. }
  117. & .el-message__closeBtn {
  118. outline: none;
  119. border-radius: 4px;
  120. right: 9px !important;
  121. transition: background-color 0.2s, color 0.2s;
  122. &:hover {
  123. background-color: rgba(0, 0, 0, 0.06);
  124. }
  125. }
  126. }