custom.scss 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. // @use 'sass:color';
  2. @use '../common-var.scss' as *;
  3. @function darken($color, $weight) {
  4. @return mix(#141414, $color, $weight);
  5. }
  6. @function tint($color, $weight) {
  7. @return mix(#fff, $color, $weight);
  8. }
  9. @each $type in map-keys($cst-button-colors) {
  10. $color: map-get($cst-button-colors, $type);
  11. [#{$type}],
  12. .el-button[#{$type}] {
  13. --el-button-bg-color: #{$color};
  14. --el-button-text-color: var(--el-color-white);
  15. --el-button-border-color: #{$color};
  16. --el-button-hover-bg-color: #{tint($color, 30%)};
  17. --el-button-hover-text-color: var(--el-color-white);
  18. --el-button-hover-border-color: #{tint($color, 30%)};
  19. --el-button-active-bg-color: #{darken($color, 20%)};
  20. --el-button-active-border-color: #{darken($color, 20%)};
  21. &.is-disabled {
  22. --el-button-disabled-bg-color: #{tint($color, 50%)};
  23. --el-button-disabled-text-color: var(--el-color-white);
  24. --el-button-disabled-border-color: #{tint($color, 50%)};
  25. }
  26. &.is-plain {
  27. --el-button-bg-color: #{tint($color, 90%)};
  28. --el-button-text-color: #{$color};
  29. --el-button-border-color: #{tint($color, 50%)};
  30. --el-button-hover-bg-color: #{$color};
  31. --el-button-hover-text-color: var(--el-color-white);
  32. --el-button-hover-border-color: #{$color};
  33. --el-button-active-bg-color: #{darken($color, 20%)};
  34. --el-button-active-border-color: #{darken($color, 20%)};
  35. --el-button-active-text-color: var(--el-color-white);
  36. &.is-disabled {
  37. --el-button-disabled-bg-color: #{tint($color, 90%)};
  38. --el-button-disabled-text-color: #{tint($color, 50%)};
  39. --el-button-disabled-border-color: #{tint($color, 80%)};
  40. }
  41. }
  42. &.is-link {
  43. --el-button-text-color: #{$color};
  44. --el-button-hover-text-color: #{$color};
  45. --el-button-hover-link-text-color: #{darken($color, 20%)};
  46. --el-button-active-color: #{darken($color, 30%)};
  47. }
  48. &[special] {
  49. --el-button-text-color: var(--el-color-primary);
  50. --el-button-hover-text-color: var(--el-color-primary);
  51. --el-button-hover-bg-color: var(--el-color-primary-light-8);
  52. --el-button-active-bg-color: var(--el-color-primary-light-9);
  53. }
  54. }
  55. }
  56. button.el-button {
  57. &:not(.is-plain, .is-round, .is-circle) {
  58. border: none;
  59. }
  60. &:not(.is-link) {
  61. min-width: 64px;
  62. }
  63. }
  64. /** 显示table的Card */
  65. .el-card[table] {
  66. border: none;
  67. &:not([shadow]) {
  68. box-shadow: none;
  69. }
  70. /** table上方无操作按钮区域 */
  71. &[less] {
  72. .el-card__body {
  73. padding-top: map-get($cst-gap-space, 'medium-mini');
  74. }
  75. }
  76. }
  77. /** 自定义pagination 样式 */
  78. .el-pagination:not(.m-t-unset) {
  79. margin-top: map-get($cst-gap-space, 'base');
  80. }
  81. /** 靠右对齐 */
  82. .el-pagination[right] {
  83. justify-content: flex-end;
  84. }
  85. .el-dialog[custom] {
  86. .el-dialog__header {
  87. height: var(--el-dialog-header-height);
  88. line-height: var(--el-dialog-header-height);
  89. background-color: var(--el-dialog-header-bg-color);
  90. border-radius: var(--el-dialog-border-radius) var(--el-dialog-border-radius) 0 0;
  91. font-size: var(--el-dialog-header-font-size);
  92. color: var(--el-dialog-header-font-color);
  93. padding: 0 var(--el-dialog-padding-primary);
  94. margin: 0;
  95. overflow: hidden;
  96. .el-dialog__headerbtn {
  97. width: var(--el-dialog-header-height);
  98. height: var(--el-dialog-header-height);
  99. top: 0;
  100. }
  101. }
  102. .el-dialog__body {
  103. max-width: 100%;
  104. overflow-x: auto;
  105. }
  106. &[unless] {
  107. .el-dialog__header {
  108. display: none;
  109. }
  110. }
  111. &[canoverflow] {
  112. & > .el-dialog__body {
  113. overflow: visible;
  114. }
  115. }
  116. &[less] {
  117. .el-dialog__header {
  118. display: block !important;
  119. }
  120. }
  121. &[small] .el-dialog__body {
  122. padding: map-get($ep-dialog-body-padding, 'small');
  123. }
  124. .el-dialog__body,
  125. &[base] .el-dialog__body {
  126. padding: map-get($ep-dialog-body-padding, 'base');
  127. }
  128. &[medium] .el-dialog__body {
  129. padding: map-get($ep-dialog-body-padding, 'medium');
  130. }
  131. &[large] .el-dialog__body {
  132. padding: map-get($ep-dialog-body-padding, 'large');
  133. }
  134. }
  135. .el-menu {
  136. border-right: none;
  137. }
  138. .el-input-number {
  139. width: 100%;
  140. .el-input__inner {
  141. text-align: left;
  142. }
  143. .el-input-number__increase,
  144. .el-input-number__decrease {
  145. top: 3px;
  146. }
  147. }
  148. .el-table--border::after,
  149. .el-table--border::before,
  150. .el-table--border .el-table__inner-wrapper::after,
  151. .el-table__inner-wrapper::before {
  152. // display: none;
  153. }
  154. .el-table__empty-block {
  155. .el-table__empty-text {
  156. line-height: 40px;
  157. }
  158. }
  159. .preview-clear-mask {
  160. // width:0;
  161. // height:0;
  162. }
  163. .no-mask,
  164. .no-mask .el-overlay-dialog {
  165. pointer-events: none;
  166. .el-dialog {
  167. pointer-events: all;
  168. .el-dialog__body {
  169. max-height: calc(100vh - var(--el-dialog-header-height));
  170. overflow: auto;
  171. }
  172. }
  173. }
  174. .el-popover.el-popper.color-picker-popover {
  175. background-color: map-get($ep-fill-color, 'light');
  176. }
  177. .el-message__badge {
  178. display: none;
  179. }
  180. .el-table__border-left-patch {
  181. background-color: #ddd !important;
  182. }
  183. .el-table--border:after,
  184. .el-table--border:before,
  185. .el-table--border .el-table__inner-wrapper:after,
  186. .el-table__inner-wrapper:before {
  187. background-color: #ddd !important;
  188. }
  189. .el-table th.el-table__cell.is-leaf,
  190. .el-table td.el-table__cell {
  191. border-bottom: 1px solid #ddd !important;
  192. border-right: 1px solid #ddd !important;
  193. }
  194. .el-table--group .el-table__inner-wrapper tr:first-child td:first-child,
  195. .el-table--group .el-table__inner-wrapper tr:first-child th:first-child,
  196. .el-table--group .el-table__footer-wrapper tr:first-child td:first-child,
  197. .el-table--group .el-table__footer-wrapper tr:first-child th:first-child,
  198. .el-table--border .el-table__inner-wrapper tr:first-child td:first-child,
  199. .el-table--border .el-table__inner-wrapper tr:first-child th:first-child,
  200. .el-table--border .el-table__footer-wrapper tr:first-child td:first-child,
  201. .el-table--border .el-table__footer-wrapper tr:first-child th:first-child {
  202. border-left: 1px solid #ddd !important;
  203. }
  204. .el-input__wrapper {
  205. box-shadow: 0 0 0 1px #ddd inset !important;
  206. }
  207. .el-table.el-table--small .el-table__body {
  208. font-size: 14px;
  209. }
  210. .el-table.el-table--small .el-table__header{
  211. font-size:13px;
  212. }
  213. .el-table__header .el-table__cell,.el-table-v2__header .el-table-v2__header-cell{
  214. background:#eaeaea !important;
  215. }
  216. .el-table .el-table__cell{
  217. text-align:center !important;
  218. }
  219. .el-table .cell.el-tooltip{
  220. min-width:30px !important;
  221. }
  222. #app {
  223. .el-table__body {
  224. .el-table__row.current-row .el-table__cell {
  225. background-color: #a1d6ff;
  226. }
  227. .el-table__row:not(.current-row, .el-table__row--striped, .top-three-row, .last-three-row) .el-table__cell {
  228. background-color: #fff;
  229. }
  230. }
  231. }
  232. body {
  233. .el-message {
  234. z-index: 10001 !important;
  235. padding: 30px 35px;
  236. * {
  237. font-size: 22px !important;
  238. }
  239. }
  240. .el-loading-mask {
  241. z-index: 1200 !important;
  242. }
  243. .el-loading-parent--relative {
  244. pointer-events: auto !important;
  245. }
  246. }
  247. // .el-table--striped .el-table__body tr.el-table__row--striped.current-row td.el-table__cell,.el-table__body tr.el-table__row--striped.current-row td.el-table__cell,.el-table__body tr.current-row > td.el-table__cell{
  248. // background-color: #A1D6FF;
  249. // }
  250. // .el-table__body tr.current-row > td.el-table__cell{
  251. // background-color: #A1D6FF;
  252. // }
  253. .keybord-dialog {
  254. .el-dialog__header {
  255. padding: 0 10px !important;
  256. }
  257. .el-dialog__body {
  258. padding: 10px !important;
  259. height: calc(100% - 104px);
  260. }
  261. .el-dialog__footer {
  262. padding: 10px !important;
  263. }
  264. }
  265. .el-table-v2 {
  266. .el-table-v2__header-row {
  267. // border-bottom:1px solid #ddd !important;
  268. // border-top:1px solid #ddd !important;
  269. border-bottom: none;
  270. .el-table-v2__header-cell {
  271. border-left: 1px solid #ddd;
  272. border-top: 1px solid #ddd;
  273. border-bottom: 1px solid #ddd;
  274. &:last-child {
  275. position: relative;
  276. border-right: 1px solid #ddd;
  277. }
  278. }
  279. }
  280. .el-table-v2__row {
  281. border-bottom: 1px solid #ddd !important;
  282. .el-table-v2__row-cell {
  283. border-left: 1px solid #ddd;
  284. &:last-child {
  285. border-right: 1px solid #ddd;
  286. }
  287. }
  288. }
  289. // .el-empty{
  290. // display:none;
  291. // }
  292. .el-table-v2__empty {
  293. height: 60px;
  294. .el-empty {
  295. display: none;
  296. }
  297. border-left: 1px solid #ddd;
  298. &:before {
  299. content: '';
  300. width: 1px;
  301. height: 100%;
  302. background: #ddd;
  303. position: absolute;
  304. right: 1px;
  305. }
  306. &:after {
  307. content: '';
  308. height: 1px;
  309. width: calc(100% - 1px);
  310. background: #ddd;
  311. position: absolute;
  312. bottom: 0;
  313. }
  314. }
  315. .el-table-v2__header-row {
  316. font-size: 12px;
  317. }
  318. .el-table-v2__row-cell {
  319. color: #666;
  320. font-size: 13px;
  321. }
  322. }
  323. .el-scrollbar__bar{
  324. display:block !important;
  325. &.is-horizontal{
  326. height:9px !important;
  327. }
  328. &.is-vertical{
  329. width:9px !important;
  330. }
  331. }
  332. .el-scrollbar__thumb{
  333. background-color:#555 !important;
  334. }