element.scss 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. /* 设置 notification、message 层级在 loading 之上 */
  2. .el-message,
  3. .el-notification {
  4. z-index: 2058 !important;
  5. }
  6. /* el-alert */
  7. .el-alert {
  8. border: 1px solid;
  9. }
  10. /* 当前页面最大化 css */
  11. .main-maximize {
  12. .aside-split,
  13. .el-aside,
  14. .el-header,
  15. .el-footer,
  16. .tabs-box {
  17. display: none !important;
  18. }
  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. // 这里减去的是 treeFilter 组件宽度
  74. width: calc(100% - 230px);
  75. }
  76. }
  77. .table-box {
  78. width: 100%;
  79. height: 100%;
  80. }
  81. /* proTable */
  82. .table-box,
  83. .table-main {
  84. display: flex;
  85. flex-direction: column;
  86. // flex: 1;
  87. // width: 100%;
  88. // height: 100%;
  89. // table-search 表格搜索样式
  90. .table-search {
  91. padding: 18px 18px 0;
  92. // margin-bottom: 10px;
  93. .el-form {
  94. .el-form-item__content > * {
  95. width: 100%;
  96. }
  97. // 去除时间选择器上下 padding
  98. .el-range-editor.el-input__wrapper {
  99. padding: 0 10px;
  100. }
  101. }
  102. .operation {
  103. display: flex;
  104. align-items: center;
  105. justify-content: flex-end;
  106. // justify-content: flex-start;
  107. margin-bottom: 18px;
  108. }
  109. }
  110. // 表格 header 样式
  111. .table-header {
  112. display: flex;
  113. .header-button-lf {
  114. // float: left;
  115. flex: 1;
  116. }
  117. .header-button-ri {
  118. // float: right;
  119. flex-shrink: 0;
  120. margin-left: $space-a2;
  121. .el-dropdown + .el-button {
  122. margin-left: 12px;
  123. }
  124. .el-button + .el-dropdown {
  125. margin-left: 12px;
  126. }
  127. }
  128. .el-button {
  129. margin-bottom: $space-b2;
  130. }
  131. }
  132. // el-table 表格样式
  133. .el-table,
  134. .el-table-v2 {
  135. flex: 1;
  136. // 修复 safari 浏览器表格错位 https://github.com/HalseySpicy/Geeker-Admin/issues/83
  137. table {
  138. width: 100%;
  139. }
  140. .el-table__header th,
  141. .el-table-v2__header-cell,
  142. .el-table-v2__header-row {
  143. height: 45px;
  144. font-size: 15px;
  145. font-weight: bold;
  146. color: var(--el-text-color-primary);
  147. background: var(--el-fill-color-light);
  148. }
  149. .el-table__row {
  150. height: 45px;
  151. font-size: 14px;
  152. .el-table__placeholder {
  153. display: inline;
  154. }
  155. }
  156. // 设置 el-table 中 header 文字不换行,并省略
  157. .el-table__header .el-table__cell > .cell {
  158. white-space: nowrap;
  159. }
  160. // 解决表格数据为空时样式不居中问题(仅在element-plus中)
  161. .el-table__empty-block {
  162. position: absolute;
  163. top: 50%;
  164. left: 50%;
  165. transform: translate(-50%, -50%);
  166. .table-empty {
  167. line-height: 30px;
  168. }
  169. }
  170. // table 中 image 图片样式
  171. .table-image {
  172. width: 50px;
  173. height: 50px;
  174. border-radius: 50%;
  175. }
  176. }
  177. // 表格 pagination 样式
  178. .el-pagination {
  179. display: flex;
  180. justify-content: flex-end;
  181. margin-top: 20px;
  182. }
  183. }
  184. /* el-table 组件大小 */
  185. .el-table--small {
  186. .el-table__header th {
  187. height: 40px !important;
  188. font-size: 14px !important;
  189. }
  190. .el-table__row {
  191. height: 40px !important;
  192. font-size: 13px !important;
  193. }
  194. }
  195. .el-table--large {
  196. .el-table__header th {
  197. height: 50px !important;
  198. font-size: 16px !important;
  199. }
  200. .el-table__row {
  201. height: 50px !important;
  202. font-size: 15px !important;
  203. }
  204. }
  205. /* el-drawer */
  206. .el-drawer {
  207. .el-drawer__header {
  208. padding: 16px 20px;
  209. margin-bottom: 0;
  210. border-bottom: 1px solid var(--el-border-color-lighter);
  211. // span {
  212. // font-size: 17px;
  213. // line-height: 17px;
  214. // color: var(--el-text-color-primary) !important;
  215. // }
  216. }
  217. .el-drawer__footer {
  218. border-top: 1px solid var(--el-border-color-lighter);
  219. }
  220. // select 样式
  221. .el-select {
  222. width: 100%;
  223. }
  224. // drawer-form 中存在两列 form-item 样式
  225. .drawer-multiColumn-form {
  226. display: flex;
  227. flex-wrap: wrap;
  228. .el-form-item {
  229. width: 47%;
  230. &:nth-child(2n-1) {
  231. margin-right: 5%;
  232. }
  233. }
  234. }
  235. }
  236. /* el-dialog */
  237. .el-dialog {
  238. .el-dialog__header {
  239. padding: 15px 20px;
  240. margin: 0;
  241. border-bottom: 1px solid var(--el-border-color-lighter);
  242. .el-dialog__title {
  243. font-size: 17px;
  244. }
  245. }
  246. }
  247. /* LOGO BG*/
  248. .logo-img-box {
  249. position: relative;
  250. margin-right: 2px;
  251. // &::before {
  252. // content: "";
  253. // position: absolute;
  254. // top: -2px;
  255. // left: -2px;
  256. // right: -2px;
  257. // bottom: -2px;
  258. // filter: blur(8px);
  259. // background: #ffffff;
  260. // z-index: 0;
  261. // transform: scale(0.6);
  262. // border-radius: 50%;
  263. // opacity: 0.5;
  264. // }
  265. }
  266. /* table col setting: dialog */
  267. // .#{$namespace}-table-col-setting {
  268. // .el-dialog__body {
  269. // background-color: $color-gray-2;
  270. // // padding: $space-b2 $space-a2;
  271. // padding: 0;
  272. // }
  273. // }
  274. .el-descriptions__body {
  275. background-color: unset;
  276. }
  277. .el-message {
  278. background-color: var(--el-bg-color) !important;
  279. .el-message__content {
  280. color: var(--lj-color-text-title);
  281. }
  282. }
  283. .el-notification {
  284. max-height: 96vh;
  285. overflow: auto;
  286. }
  287. // .vxe-table--render-default .vxe-table--body-wrapper,
  288. // .vxe-table--render-default .vxe-table--footer-wrapper {
  289. // background-color: var(--el-bg-color) !important;
  290. // }
  291. .el-checkbox__disabled-checked {
  292. .el-checkbox__inner {
  293. background-color: var(--lj-color-primary-300) !important;
  294. border-color: var(--lj-color-primary-300) !important;
  295. &::after {
  296. border-color: var(--lj-color-primary-600);
  297. }
  298. }
  299. }
  300. .vxe-body--row.row--current.row--hover {
  301. .el-checkbox__disabled-checked {
  302. .el-checkbox__inner {
  303. background-color: var(--lj-color-primary-200) !important;
  304. border-color: var(--lj-color-primary-200) !important;
  305. &::after {
  306. border-color: var(--lj-color-primary-600) !important;
  307. }
  308. }
  309. }
  310. }
  311. .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner:after,
  312. .is-disabled.el-checkbox__disabled-checked .el-checkbox__inner:after {
  313. border-color: var(--lj-color-gray-8) !important;
  314. }
  315. .is-disabled,
  316. .is-disabled:focus,
  317. .is-disabled:hover {
  318. // opacity: 0.8;
  319. color: $color-text-disable !important;
  320. }
  321. .input-with-select {
  322. .el-input-group__prepend {
  323. padding: 0;
  324. }
  325. }
  326. .el-notification--upload {
  327. padding: $space-b2;
  328. .el-notification__group {
  329. display: flex;
  330. flex-direction: column;
  331. width: 100%;
  332. }
  333. }
  334. .col--filter {
  335. &:not(.is--filter-active) {
  336. .vxe-cell--filter {
  337. display: none;
  338. }
  339. }
  340. &:hover {
  341. .vxe-cell--filter {
  342. display: block;
  343. }
  344. }
  345. }
  346. /**el-tabs弹性布局重写*/
  347. .lj-tabs-flex-full {
  348. height: 100%;
  349. display: flex;
  350. flex-direction: column;
  351. .el-tabs__content {
  352. flex: 1;
  353. }
  354. .el-tab-pane {
  355. height: 100%;
  356. display: flex;
  357. flex-direction: column;
  358. }
  359. }
  360. /**el-tabs弹性布局重写*/
  361. .lj-van-tabs-flex-full {
  362. height: 100%;
  363. display: flex;
  364. flex-direction: column;
  365. .van-tabs__content {
  366. flex: 1;
  367. }
  368. .van-tab__panel {
  369. height: 100%;
  370. display: flex;
  371. flex-direction: column;
  372. }
  373. }
  374. .layout-search-menu-input {
  375. display: flex;
  376. align-items: center;
  377. height: var(--el-menu-item-height);
  378. line-height: var(--el-menu-item-height);
  379. font-size: var(--el-menu-item-font-size);
  380. color: var(--el-menu-text-color);
  381. padding: 0 var(--el-menu-base-level-padding);
  382. list-style: none;
  383. cursor: pointer;
  384. position: relative;
  385. // transition: border-color var(--el-transition-duration), background-color var(--el-transition-duration), color var(--el-transition-duration);
  386. // box-sizing: border-box;
  387. // white-space: nowrap;
  388. &.is-before {
  389. > * {
  390. z-index: 1;
  391. }
  392. &::before {
  393. content: "";
  394. position: absolute;
  395. right: var(--el-menu-base-level-padding);
  396. left: var(--el-menu-base-level-padding);
  397. top: $space-b1;
  398. bottom: $space-b1;
  399. background-color: $color-gray-3;
  400. z-index: 0;
  401. border-radius: $br-sm;
  402. }
  403. &:hover {
  404. &::before {
  405. background-color: $color-primary-000;
  406. }
  407. }
  408. }
  409. &:not(.is-before):hover {
  410. color: $color-primary-500;
  411. background-color: $color-primary-000;
  412. }
  413. }
  414. /* 在全局样式文件中 */
  415. .el-message,
  416. .el-notification {
  417. z-index: 9999 !important; /* 确保通知总是在最顶层 */
  418. }
  419. /* vxe-table header、footer强制居中 */
  420. .vxe-table--render-default .vxe-header--column,
  421. .vxe-table--render-default .vxe-footer--column {
  422. text-align: center !important;
  423. }
  424. .vxe-table--render-default .vxe-header--column .vxe-cell,
  425. .vxe-table--render-default .vxe-footer--column .vxe-cell {
  426. justify-content: center !important;
  427. }