element.scss 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. /* el-alert */
  2. .el-alert {
  3. border: 1px solid;
  4. }
  5. /* 当前页面最大化 css */
  6. .main-maximize {
  7. .aside-split,
  8. .el-aside,
  9. .el-header,
  10. .el-footer,
  11. .tabs-box {
  12. display: none !important;
  13. }
  14. }
  15. /* mask image */
  16. .mask-image {
  17. padding-right: 50px;
  18. mask-image: linear-gradient(90deg, #000000 0%, #000000 calc(100% - 50px), transparent);
  19. }
  20. /* custom card */
  21. .card {
  22. box-sizing: border-box;
  23. padding: 20px;
  24. overflow-x: hidden;
  25. background-color: var(--el-bg-color);
  26. border: 1px solid var(--el-border-color-light);
  27. border-radius: 6px;
  28. box-shadow: 0 0 12px rgb(0 0 0 / 5%);
  29. }
  30. /* ProTable 不需要 card 样式(在组件内使用 ProTable 会使用到) */
  31. .no-card {
  32. .card {
  33. padding: 0;
  34. background-color: transparent;
  35. border: none;
  36. border-radius: 0;
  37. box-shadow: none;
  38. }
  39. .table-search {
  40. padding: 18px 0 0 !important;
  41. margin-bottom: 0 !important;
  42. }
  43. }
  44. /* content-box (常用内容盒子) */
  45. .content-box {
  46. display: flex;
  47. flex-direction: column;
  48. align-items: center;
  49. height: 100%;
  50. .text {
  51. margin: 20px 0 30px;
  52. font-size: 23px;
  53. font-weight: bold;
  54. color: var(--el-text-color-regular);
  55. }
  56. .el-descriptions {
  57. width: 100%;
  58. padding: 40px 0 0;
  59. .el-descriptions__title {
  60. font-size: 18px;
  61. }
  62. .el-descriptions__label {
  63. width: 200px;
  64. }
  65. }
  66. }
  67. /* main-box (树形表格 treeFilter 页面会使用,左右布局 flex) */
  68. .main-box {
  69. display: flex;
  70. width: 100%;
  71. height: 100%;
  72. .table-box {
  73. overflow: hidden;
  74. }
  75. }
  76. /* proTable */
  77. .table-box,
  78. .table-main {
  79. display: flex;
  80. flex: 1;
  81. flex-direction: column;
  82. width: 100%;
  83. height: 100%;
  84. // table-search 表格搜索样式
  85. .table-search {
  86. padding: 18px 18px 0;
  87. margin-bottom: 10px;
  88. .el-form {
  89. .el-form-item__content > * {
  90. width: 100%;
  91. }
  92. // 去除时间选择器上下 padding
  93. .el-range-editor.el-input__wrapper {
  94. padding: 0 10px;
  95. }
  96. }
  97. .operation {
  98. display: flex;
  99. align-items: center;
  100. justify-content: flex-end;
  101. margin-bottom: 18px;
  102. }
  103. }
  104. // 表格 header 样式
  105. .table-header {
  106. .header-button-lf,
  107. .header-button-ri {
  108. display: flex;
  109. flex-wrap: wrap;
  110. gap: 15px 12px;
  111. margin-bottom: 15px;
  112. .el-button:not(.el-input .el-button) {
  113. margin-left: 0;
  114. }
  115. }
  116. .header-button-lf {
  117. float: left;
  118. }
  119. .header-button-ri {
  120. float: right;
  121. }
  122. }
  123. // el-table 表格样式
  124. .el-table {
  125. flex: 1;
  126. // 修复 safari 浏览器表格错位 https://github.com/HalseySpicy/Geeker-Admin/issues/83
  127. table {
  128. width: 100%;
  129. }
  130. .el-table__header th {
  131. height: 45px;
  132. font-size: 15px;
  133. font-weight: bold;
  134. color: var(--el-text-color-primary);
  135. background: var(--el-fill-color-light);
  136. }
  137. .el-table__row {
  138. height: 45px;
  139. font-size: 14px;
  140. .move {
  141. cursor: move;
  142. .el-icon {
  143. cursor: move;
  144. }
  145. }
  146. }
  147. // 设置 el-table 中 header 文字不换行,并省略
  148. .el-table__header .el-table__cell > .cell {
  149. // white-space: nowrap;
  150. white-space: wrap;
  151. }
  152. // 解决表格数据为空时样式不居中问题(仅在element-plus中)
  153. .el-table__empty-block {
  154. position: absolute;
  155. .table-empty {
  156. line-height: 30px;
  157. img {
  158. display: inline-flex;
  159. }
  160. }
  161. }
  162. // table 中 image 图片样式
  163. .table-image {
  164. width: 50px;
  165. height: 50px;
  166. border-radius: 50%;
  167. }
  168. }
  169. // 表格 pagination 样式
  170. .el-pagination {
  171. display: flex;
  172. justify-content: flex-end;
  173. margin-top: 20px;
  174. }
  175. }
  176. /* el-table 组件大小 */
  177. .el-table--small {
  178. .el-table__header th {
  179. height: 40px !important;
  180. font-size: 14px !important;
  181. }
  182. .el-table__row {
  183. height: 40px !important;
  184. font-size: 13px !important;
  185. }
  186. }
  187. .el-table--large {
  188. .el-table__header th {
  189. height: 50px !important;
  190. font-size: 16px !important;
  191. }
  192. .el-table__row {
  193. height: 50px !important;
  194. font-size: 15px !important;
  195. }
  196. }
  197. /* el-drawer */
  198. .el-drawer {
  199. .el-drawer__header {
  200. padding: 16px 20px;
  201. margin-bottom: 0;
  202. border-bottom: 1px solid var(--el-border-color-lighter);
  203. span {
  204. font-size: 17px;
  205. line-height: 17px;
  206. color: var(--el-text-color-primary) !important;
  207. }
  208. }
  209. .el-drawer__footer {
  210. border-top: 1px solid var(--el-border-color-lighter);
  211. }
  212. // select 样式
  213. .el-select {
  214. width: 100%;
  215. }
  216. // drawer-form 中存在两列 form-item 样式
  217. .drawer-multiColumn-form {
  218. display: flex;
  219. flex-wrap: wrap;
  220. .el-form-item {
  221. width: 47%;
  222. &:nth-child(2n-1) {
  223. margin-right: 5%;
  224. }
  225. }
  226. }
  227. }
  228. /* el-dialog */
  229. .el-dialog {
  230. padding: 0;
  231. .el-dialog__header {
  232. padding: 15px 20px;
  233. margin: 0;
  234. border-bottom: 1px solid var(--el-border-color-lighter);
  235. .el-dialog__title {
  236. font-size: 17px;
  237. }
  238. }
  239. .el-dialog__body,
  240. .el-dialog__footer {
  241. padding: 15px 20px;
  242. }
  243. }