index.scss 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. @import '../common/abstracts/variable';
  2. @import '../common/abstracts/mixin';
  3. .wot-theme-dark {
  4. @include b(table) {
  5. background: $-dark-background;
  6. @include when(border) {
  7. border: 1px solid $-dark-border-color;
  8. }
  9. @include e(cell) {
  10. color: $-dark-color;
  11. background: $-dark-background2;
  12. @include when(stripe) {
  13. background: $-dark-background4;
  14. }
  15. @include when(border) {
  16. border-right: 1px solid $-dark-border-color;
  17. border-bottom: 1px solid $-dark-border-color;
  18. }
  19. @include when(shadow) {
  20. &::after {
  21. background: linear-gradient(270deg, rgba(17, 17, 17, 0.2) 0%, rgba(0, 0, 0, 0) 100%);
  22. }
  23. }
  24. }
  25. }
  26. }
  27. @include b(table) {
  28. position: relative;
  29. width: 100%;
  30. overflow: auto;
  31. background: $-table-bg;
  32. @include when(border) {
  33. border: 1px solid $-table-border-color;
  34. }
  35. :deep() {
  36. .wd-table-col:last-child {
  37. .wd-table__cell {
  38. @include when(border) {
  39. border-right: none;
  40. }
  41. }
  42. }
  43. }
  44. @include e(header) {
  45. width: 100%;
  46. height: 50px;
  47. position: sticky;
  48. top: 0;
  49. z-index: 2;
  50. display: flex;
  51. overflow-x: auto;
  52. white-space: nowrap;
  53. }
  54. @include e(body) {
  55. width: 100%;
  56. box-sizing: border-box;
  57. }
  58. @include e(content) {
  59. display: flex;
  60. @include m(header) {
  61. position: sticky;
  62. top: 0;
  63. z-index: 2
  64. }
  65. }
  66. @include e(cell) {
  67. display: flex;
  68. align-items: center;
  69. box-sizing: border-box;
  70. background: $-table-bg;
  71. width: 100px;
  72. min-height: 50px;
  73. padding: 8px 10px;
  74. font-size: $-table-font-size;
  75. color: $-table-color;
  76. --wot-sort-button-height: 30px;
  77. @include when(border) {
  78. border-right: 1px solid $-table-border-color;
  79. border-bottom: 1px solid $-table-border-color;
  80. }
  81. @include when(stripe) {
  82. background: $-table-stripe-bg;
  83. }
  84. @include when(fixed) {
  85. position: sticky;
  86. z-index: 1;
  87. left: 0;
  88. }
  89. @include when(shadow) {
  90. &::after {
  91. content: ' ';
  92. position: absolute;
  93. height: 100%;
  94. right: -30rpx;
  95. top: 0;
  96. width: 30rpx;
  97. height: 100%;
  98. background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 0.04) 100%);
  99. }
  100. }
  101. @include when(left) {
  102. justify-content: flex-start;
  103. }
  104. @include when(center) {
  105. justify-content: center;
  106. }
  107. @include when(right) {
  108. justify-content: flex-end;
  109. }
  110. }
  111. @include e(wrapper) {
  112. width: 100%;
  113. overflow: auto;
  114. }
  115. @include e(inner) {
  116. display: flex;
  117. flex-direction: column;
  118. }
  119. @include e(header-row) {
  120. display: flex;
  121. flex-direction: row;
  122. width: 100%;
  123. }
  124. @include e(body) {
  125. display: flex;
  126. width: 100%;
  127. }
  128. @include e(value) {
  129. white-space: normal;
  130. @include when(ellipsis) {
  131. word-break: break-all;
  132. @include multiEllipsis(2);
  133. }
  134. }
  135. }