element.scss 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. /* 设置 notification、message 层级在 loading 之上 */
  2. .el-message,
  3. .el-notification {
  4. z-index: 2070 !important;
  5. }
  6. label {
  7. font-weight: 700;
  8. }
  9. .el-form-item__label {
  10. // display: list-item;
  11. // overflow: hidden;
  12. font-weight: 700;
  13. // text-overflow: ellipsis;
  14. // white-space: nowrap;
  15. }
  16. .dialog-slot-c {
  17. .el-tabs__content {
  18. max-height: 52vh;
  19. overflow: hidden;
  20. overflow: auto;
  21. }
  22. }
  23. // .el-form-item--default {
  24. // margin-bottom: 12px;
  25. // }
  26. /* el-alert */
  27. .el-alert {
  28. border: 1px solid;
  29. }
  30. .el-select {
  31. width: 100%;
  32. }
  33. .el-date-editor.el-input {
  34. width: 100%;
  35. }
  36. .el-input-number {
  37. width: 100%;
  38. }
  39. /* 当前页面最大化 css */
  40. .main-maximize {
  41. .aside-split,
  42. .el-aside,
  43. .el-header,
  44. .el-footer,
  45. .tabs-box {
  46. display: none !important;
  47. }
  48. }
  49. /* mask image */
  50. .mask-image {
  51. padding-right: 50px;
  52. mask-image: linear-gradient(90deg, #000000 0%, #000000 calc(100% - 50px), transparent);
  53. }
  54. /* custom card */
  55. .card {
  56. box-sizing: border-box;
  57. padding: 12px;
  58. overflow-x: hidden;
  59. background-color: var(--el-bg-color);
  60. border: 1px solid var(--el-border-color-light);
  61. border-radius: 6px;
  62. box-shadow: 0 0 12px rgb(0 0 0 / 5%);
  63. }
  64. /* ProTable 不需要 card 样式(在组件内使用 ProTable 会使用到) */
  65. .no-card {
  66. .card {
  67. padding: 0;
  68. background-color: transparent;
  69. border: none;
  70. border-radius: 0;
  71. box-shadow: none;
  72. }
  73. .table-search {
  74. padding: 12px 0 0 !important;
  75. margin-bottom: 0 !important;
  76. }
  77. }
  78. /* content-box (常用内容盒子) */
  79. .content-box {
  80. display: flex;
  81. flex-direction: column;
  82. align-items: center;
  83. height: 100%;
  84. .text {
  85. margin: 20px 0 30px;
  86. font-size: 23px;
  87. font-weight: bold;
  88. color: var(--el-text-color-regular);
  89. }
  90. .el-descriptions {
  91. width: 100%;
  92. padding: 40px 0 0;
  93. .el-descriptions__title {
  94. font-size: 18px;
  95. }
  96. .el-descriptions__label {
  97. width: 200px;
  98. }
  99. }
  100. }
  101. .content-box-c {
  102. height: 100%;
  103. padding: 32px 24px;
  104. .el-collapse {
  105. // border: none;
  106. border-top: none;
  107. // border: 1px solid var(--el-collapse-border-color);
  108. border-radius: 6px;
  109. }
  110. .el-collapse-item {
  111. margin-bottom: 20px;
  112. }
  113. .el-collapse-item__wrap {
  114. border-bottom: none;
  115. }
  116. .el-collapse-item__content {
  117. padding: 18px 18px 0;
  118. border-bottom: 1px;
  119. }
  120. .el-collapse-item__header {
  121. height: 35px;
  122. padding-left: 24px;
  123. font-weight: 700;
  124. color: var(--el-color-white);
  125. background-color: var(--el-color-primary);
  126. border-top-left-radius: 6px;
  127. border-top-right-radius: 6px;
  128. &:hover {
  129. color: #ffffff;
  130. background: var(--el-color-primary-light-5);
  131. border-color: var(--el-color-primary-light-5);
  132. transition: 0.1s;
  133. }
  134. &.active {
  135. font-weight: bold;
  136. color: #ffffff;
  137. background: var(--el-color-primary);
  138. border-color: var(--el-color-primary);
  139. }
  140. }
  141. }
  142. /* main-box (树形表格 treeFilter 页面会使用,左右布局 flex) */
  143. .main-box {
  144. display: flex;
  145. width: 100%;
  146. height: 100%;
  147. .table-box {
  148. // 这里减去的 230px 是 treeFilter 组件宽度
  149. width: calc(100% - 230px);
  150. }
  151. }
  152. /* proTable */
  153. .table-box,
  154. .table-main {
  155. display: flex;
  156. flex: 1;
  157. flex-direction: column;
  158. width: 100%;
  159. height: 100%;
  160. // table-search 表格搜索样式
  161. .table-search {
  162. padding: 18px 18px 0;
  163. margin-bottom: 6px;
  164. .el-form {
  165. .el-form-item__content > * {
  166. width: 100%;
  167. }
  168. .el-select {
  169. width: 100%;
  170. }
  171. // 去除时间选择器上下 padding
  172. .el-range-editor.el-input__wrapper {
  173. padding: 0 10px;
  174. }
  175. }
  176. .operation {
  177. display: flex;
  178. align-items: center;
  179. justify-content: flex-end;
  180. margin-bottom: 18px;
  181. }
  182. }
  183. // 表格 header 样式
  184. .table-header {
  185. .header-button-lf {
  186. float: left;
  187. }
  188. .header-button-ri {
  189. float: right;
  190. }
  191. .el-button {
  192. margin-bottom: 12px;
  193. }
  194. }
  195. // el-table 表格样式
  196. .el-table {
  197. flex: 1;
  198. // 修复 safari
  199. table {
  200. width: 100%;
  201. }
  202. .el-table__header th {
  203. height: 45px;
  204. font-size: 15px;
  205. font-weight: bold;
  206. color: var(--el-text-color-primary);
  207. background: var(--el-fill-color-light);
  208. }
  209. .el-table__row {
  210. height: 45px;
  211. font-size: 14px;
  212. .move {
  213. cursor: move;
  214. .el-icon {
  215. cursor: move;
  216. }
  217. }
  218. }
  219. // 设置 el-table 中 header 文字不换行,并省略
  220. .el-table__header .el-table__cell > .cell {
  221. // white-space: nowrap;
  222. white-space: wrap;
  223. }
  224. // 解决表格数据为空时样式不居中问题(仅在element-plus中)
  225. .el-table__empty-block {
  226. position: absolute;
  227. top: 50%;
  228. left: 50%;
  229. transform: translate(-50%, -50%);
  230. .table-empty {
  231. line-height: 30px;
  232. }
  233. }
  234. // table 中 image 图片样式
  235. .table-image {
  236. width: 50px;
  237. height: 50px;
  238. border-radius: 50%;
  239. }
  240. }
  241. // 表格 pagination 样式
  242. .el-pagination {
  243. display: flex;
  244. justify-content: flex-end;
  245. margin-top: 12px;
  246. }
  247. }
  248. /* el-table 组件大小 */
  249. .el-table--small {
  250. .el-table__header th {
  251. height: 40px !important;
  252. font-size: 14px !important;
  253. }
  254. .el-table__row {
  255. height: 40px !important;
  256. font-size: 13px !important;
  257. }
  258. }
  259. .el-table--large {
  260. .el-table__header th {
  261. height: 50px !important;
  262. font-size: 16px !important;
  263. }
  264. .el-table__row {
  265. height: 50px !important;
  266. font-size: 15px !important;
  267. }
  268. }
  269. /* el-drawer */
  270. .el-drawer {
  271. .el-drawer__header {
  272. padding: 16px 20px;
  273. margin-bottom: 0;
  274. border-bottom: 1px solid var(--el-border-color-lighter);
  275. span {
  276. font-size: 17px;
  277. line-height: 17px;
  278. color: var(--el-text-color-primary) !important;
  279. }
  280. }
  281. .el-drawer__footer {
  282. border-top: 1px solid var(--el-border-color-lighter);
  283. }
  284. // select 样式
  285. .el-select {
  286. width: 100%;
  287. }
  288. // drawer-form 中存在两列 form-item 样式
  289. .drawer-multiColumn-form {
  290. display: flex;
  291. flex-wrap: wrap;
  292. // .el-form-item {
  293. // width: 47%;
  294. // &:nth-child(2n-1) {
  295. // // margin-right: 5%;
  296. // }
  297. // }
  298. }
  299. }
  300. /* el-dialog */
  301. .el-dialog {
  302. border-radius: 6px;
  303. .el-dialog__header {
  304. padding: 15px 20px;
  305. margin: 0;
  306. // background-color: var(--el-color-primary);
  307. border-bottom: 1px solid var(--el-border-color-lighter);
  308. // border-top-left-radius: 6px;
  309. // border-top-right-radius: 6px;
  310. .el-dialog__title {
  311. font-size: 18px;
  312. // color: var(--el-dialog-bg-color);
  313. }
  314. // .el-dialog__close {
  315. // color: var(--el-dialog-bg-color);
  316. // }
  317. }
  318. }