element.scss 6.8 KB

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