index.scss 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. /** 全局样式 */
  2. @use 'element-plus/theme-chalk/src/mixins/function.scss' as *;
  3. @use './transition.scss' as *;
  4. .ele-page,
  5. .ele-admin-tabs {
  6. --ele-page-padding: 12px;
  7. }
  8. * {
  9. outline: none;
  10. }
  11. html {
  12. overflow-x: hidden;
  13. height: 100%;
  14. }
  15. body {
  16. margin: 0;
  17. line-height: 1.58;
  18. color: getCssVar('text-color', 'regular');
  19. font-size: getCssVar('font-size', 'base');
  20. font-family: getCssVar('font-family');
  21. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  22. overflow-x: hidden;
  23. overflow-y: auto;
  24. height: 100%;
  25. width: 100% !important;
  26. }
  27. /* 按钮加图标减少间距 */
  28. .ele-btn-icon.el-button,
  29. .ele-btn-icon.el-button.is-round {
  30. padding-left: 12px;
  31. padding-right: 12px;
  32. &>.el-icon {
  33. margin-left: -2px;
  34. margin-right: -2px;
  35. }
  36. &.el-button--small {
  37. padding-left: 6px;
  38. padding-right: 6px;
  39. }
  40. &.el-button--large {
  41. padding-left: 16px;
  42. padding-right: 16px;
  43. }
  44. }
  45. .demo-timeline {
  46. .el-timeline {
  47. padding: 0;
  48. padding-left: 20px;
  49. }
  50. }
  51. //订单详情
  52. .order-detail {
  53. .el-step.is-center .el-step__description {
  54. padding: 0;
  55. }
  56. }
  57. /* 级联选择器增加高度 */
  58. .ele-popper-higher .el-cascader-menu__wrap.el-scrollbar__wrap {
  59. height: 280px;
  60. }
  61. /* 间距组件样式优化 */
  62. .el-space--horizontal>.el-space__item:last-child {
  63. margin-right: 0 !important;
  64. }
  65. .el-space--vertical>.el-space__item:last-child {
  66. padding-bottom: 0 !important;
  67. }
  68. /* echarts */
  69. .echarts>div>div {
  70. max-width: 100%;
  71. overflow: hidden;
  72. }
  73. /* 小屏幕时分页去掉一些组件 */
  74. @media screen and (max-width: 768px) {
  75. .ele-pro-table .el-pagination {
  76. .el-pagination__sizes,
  77. .el-pagination__jump {
  78. display: none;
  79. }
  80. }
  81. }
  82. /* 表单验证气泡形式 */
  83. .pro-form-error-popper.el-form-item>.el-form-item__content {
  84. &>.el-form-item__error {
  85. position: absolute;
  86. left: 0;
  87. top: auto;
  88. bottom: calc(100% + 3px);
  89. width: max-content;
  90. color: #fff;
  91. font-size: 12px;
  92. background: getCssVar('color-danger');
  93. transition: all 0.2s;
  94. padding: 4px 6px;
  95. border-radius: 3px;
  96. z-index: 999;
  97. transform: none;
  98. &:after {
  99. content: '';
  100. border: 4px solid transparent;
  101. border-top-color: getCssVar('color-danger');
  102. position: absolute;
  103. left: 8px;
  104. bottom: -7px;
  105. }
  106. }
  107. }
  108. //上传组件样式
  109. .upload-image {
  110. margin-right: 10px;
  111. .el-upload {
  112. width: 100px;
  113. height: 100px;
  114. }
  115. }
  116. //表单下编辑器样式
  117. .simple-form {
  118. .tox-tinymce {
  119. width: 100% !important;
  120. }
  121. }
  122. //table操作按钮
  123. .ele-pro-table {
  124. .el-table .cell.el-tooltip {
  125. white-space: wrap;
  126. }
  127. // .action-btns {
  128. // .el-button {
  129. // margin-right: 8px;
  130. // margin-left: 0;
  131. // &:nth-child(even) {
  132. // margin-right: 0;
  133. // }
  134. // }
  135. // .el-button+.el-button {
  136. // margin-left: 0;
  137. // }
  138. // }
  139. .el-button {
  140. margin-right: 5px;
  141. }
  142. .el-button+.el-button {
  143. margin-left: 0;
  144. }
  145. .el-text {
  146. align-self: flex-start;
  147. text-align: left;
  148. }
  149. //toolbar的状态选择
  150. .ele-toolbar-body {
  151. .el-radio-group {
  152. position: relative;
  153. top: -3px;
  154. }
  155. .el-radio-button {
  156. min-width: 120px;
  157. }
  158. .el-radio-button__inner {
  159. width: 100%;
  160. padding: 9px 15px;
  161. }
  162. }
  163. .el-tag__content {
  164. display: flex;
  165. width: 100%;
  166. }
  167. }
  168. //搜索况下时间选择框的样式
  169. .search-form {
  170. .el-form-item {
  171. margin-bottom: 12px;
  172. position: relative;
  173. .el-form-item__label {
  174. position: absolute;
  175. top: -10px;
  176. right: 12px;
  177. font-size: 14px;
  178. display: inline-block;
  179. z-index: 2;
  180. height: 18px;
  181. line-height: 18px;
  182. padding: 0;
  183. width: fit-content !important;
  184. }
  185. }
  186. //不显示label
  187. &.no-label-search .el-form-item .el-form-item__label {
  188. display: none;
  189. }
  190. .el-date-editor.el-input,
  191. .el-date-editor.el-input__wrapper {
  192. width: 100%
  193. }
  194. }
  195. /* 主题切换过渡 */
  196. ::view-transition-old(root),
  197. ::view-transition-new(root) {
  198. animation: none;
  199. mix-blend-mode: normal;
  200. }
  201. ::view-transition-new(root),
  202. html.dark::view-transition-old(root) {
  203. z-index: 1;
  204. }
  205. ::view-transition-old(root),
  206. html.dark::view-transition-new(root) {
  207. z-index: 2147483646;
  208. }
  209. html.disabled-transition,
  210. html.disabled-transition :not(.view-transition-trigger) * {
  211. transition: none !important;
  212. }
  213. .article-dialog {
  214. .el-dialog__body {
  215. max-height: 80vh;
  216. overflow-y: auto;
  217. }
  218. }
  219. //基础信息展示样式
  220. .common-row {
  221. padding-left: 12px;
  222. .el-col {
  223. line-height: 32px;
  224. margin-bottom: 6px;
  225. }
  226. }
  227. //表单中基础样式
  228. .el-form {
  229. .is-without-controls {
  230. .el-input .el-input__wrapper {
  231. padding-left: 10px;
  232. }
  233. .el-input-number .el-input__inner {
  234. text-align: left !important;
  235. }
  236. }
  237. }
  238. .common-title {
  239. font-size: 18px;
  240. font-weight: 550;
  241. }
  242. .el-statistic {
  243. .el-statistic__head {
  244. font-size: 14px;
  245. }
  246. }
  247. .common-section {
  248. padding: 12px 30px;
  249. background-color: #fcfbfa;
  250. border-radius: 6px;
  251. .el-form-item {
  252. margin-bottom: 10px;
  253. }
  254. }
  255. .custom-select {
  256. .el-select__wrapper {
  257. .el-select__placeholder {
  258. position: relative;
  259. white-space: pre-wrap;
  260. top: 0;
  261. transform: translateY(0);
  262. }
  263. }
  264. .el-select-dropdown .el-select-dropdown__item {
  265. white-space: normal;
  266. }
  267. }