_table.scss 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. .table {
  2. color: $font-color;
  3. margin-bottom: 0;
  4. }
  5. .table-middle {
  6. td {
  7. vertical-align: middle;
  8. }
  9. }
  10. .table-text-center {
  11. th {
  12. text-align: center;
  13. }
  14. td {
  15. text-align: center;
  16. }
  17. }
  18. table.data-table thead tr {
  19. background: transparent;
  20. }
  21. .table thead th {
  22. padding: .65rem;
  23. font-weight: 600;
  24. text-transform: capitalize;
  25. font-size: .95rem!important;
  26. border-bottom: 1px solid $table-border-color;
  27. //background: #f4f7fa;
  28. //border-top: 1px solid $table-border-color!important;
  29. }
  30. table.data-table thead th, table.data-table thead td, table.data-table tfoot th, table.data-table tfoot td {
  31. font-size: .9rem!important;
  32. }
  33. table.data-table:not(.table-bordered) thead tr th {
  34. text-transform: capitalize;
  35. }
  36. table.data-table {
  37. border: 0;
  38. }
  39. .table td {
  40. padding: .55rem;
  41. height: 55px;
  42. line-height: 1.42857;
  43. border-color: $table-border-color;
  44. }
  45. .table tr td:first-child, .table tr th:first-child {
  46. padding-left: 2rem;
  47. }
  48. .quick-search-clear {
  49. margin-left:-1.45rem;
  50. position: relative;
  51. color: $white;
  52. }
  53. // 解决 rwd-table 下拉选框显示bug
  54. .table-responsive {
  55. border: 0!important;
  56. margin-bottom: 0!important;
  57. overflow-x: inherit;
  58. }
  59. .table-responsive[data-pattern=priority-columns] {
  60. overflow-y: auto!important;
  61. }
  62. .custom-data-table-header .table-responsive {
  63. overflow: visible!important;
  64. padding-bottom: 0!important;
  65. }
  66. .sticky-table-header {
  67. z-index: 45!important;
  68. }
  69. // 解决 rwd-table 下拉选框显示bug
  70. table.table-bordered.data-table:not(.complex-headers) tbody th, table.table-bordered.data-table tbody td {
  71. border-bottom-width: 1px
  72. }
  73. table.table-bordered.data-table th:not(.complex-headers), table.table-bordered.data-table td {
  74. border-left-width: 1px;
  75. }
  76. table.table-bordered.data-table th:last-child, table.table-bordered.data-table th:last-child, table.table-bordered.data-table td:last-child, table.table-bordered.data-table td:last-child {
  77. border-right-width: 1px;
  78. }
  79. table.data-table.complex-headers {
  80. border: 1px solid $table-border-color-darker;
  81. }
  82. table.data-table.complex-headers thead th, table.data-table.complex-headers thead td, table.data-table.complex-headers tfoot th, table.data-table.complex-headers tfoot td {
  83. border-bottom: 1px solid $table-border-color-darker;
  84. border-right: 1px solid $table-border-color-darker;
  85. }
  86. .data-table.table-bordered:not(.complex-headers) thead th {
  87. border-right: 1px solid darken($border-color, 3%);
  88. border-bottom: 1px solid darken($border-color, 3%);
  89. }
  90. .data-table.table-bordered:not(.complex-headers) tr:first-child th {
  91. border-top: 1px solid darken($border-color, 3%);
  92. }
  93. .data-table.table-bordered:not(.complex-headers) thead tr th:first-child {
  94. border-left: 1px solid darken($border-color, 3%);
  95. }
  96. /* ------------------- 多表头 --------------------- */
  97. table.table-bordered.data-table.complex-headers {
  98. border-spacing: 0;
  99. margin-top: 12px!important;
  100. box-shadow: $shadow;
  101. thead th {
  102. vertical-align: middle;
  103. font-size: 1rem!important;
  104. }
  105. tbody tr {
  106. box-shadow: none;
  107. border-radius: 0;
  108. td {
  109. border-bottom: 1px solid lighten($table-border-color-darker, 4%);
  110. border-right: 1px solid lighten($table-border-color-darker, 4%);
  111. }
  112. td:first-child {
  113. border-top-left-radius: 0;
  114. border-bottom-left-radius: 0;
  115. }
  116. td:last-child {
  117. border-top-right-radius: 0;
  118. border-bottom-right-radius: 0;
  119. border-right: 0;
  120. }
  121. }
  122. tbody tr:last-child td {
  123. border-bottom: 0;
  124. }
  125. }
  126. .table-hover tbody tr:hover {
  127. color: $font-color;
  128. background-color: lighten($dark30, 1%);
  129. }
  130. /*--------------------------------------------------- */
  131. .table.default-table {
  132. tr {
  133. box-shadow: none!important;
  134. }
  135. td {
  136. border-top: 1px solid #f0f4f8!important;
  137. border-radius: 0!important;
  138. }
  139. thead th {
  140. border-bottom: 2px solid #f0f4f8!important;
  141. }
  142. }
  143. .table.default-table.table-bordered th, .table.default-table.table-bordered td {
  144. border: 1px solid #f0f4f8!important;
  145. }
  146. $table-border-color: #eff3f8;
  147. $table-bg: darken(#f7f7f9, 3.8%);
  148. .table-collapse {
  149. .custom-data-table.data-table tbody tr td:first-child {
  150. border-top-left-radius: 0;
  151. border-bottom-left-radius: 0;
  152. }
  153. .custom-data-table.data-table tbody tr td:last-child{
  154. border-top-right-radius: 0;
  155. border-bottom-right-radius: 0;
  156. }
  157. .custom-data-table.data-table tbody tr:first-child td:first-child {
  158. border-top-left-radius: $card-border-radius;
  159. }
  160. .custom-data-table.data-table tbody tr:first-child td:last-child{
  161. border-top-right-radius: $card-border-radius;
  162. }
  163. .custom-data-table.data-table tbody tr:last-child td:first-child {
  164. border-bottom-left-radius: $card-border-radius;
  165. }
  166. .custom-data-table.data-table tbody tr:last-child td:last-child{
  167. border-bottom-right-radius: $card-border-radius;
  168. }
  169. .table.custom-data-table {
  170. padding: 3px 5px 5px;
  171. }
  172. .table-fixed-left .table.custom-data-table {
  173. padding: 3px 0 0 5px;
  174. }
  175. .table-fixed-right .table.custom-data-table {
  176. padding: 3px 5px 0 0;
  177. }
  178. .table-fixed th {
  179. background: $table-bg;
  180. }
  181. }
  182. body:not(.dark-mode) {
  183. .table-collapse {
  184. box-shadow: $shadow;
  185. background: $table-bg;
  186. margin-top: 1rem;
  187. //padding: 0 3px 3px;
  188. .custom-data-table {
  189. border-spacing: 0;
  190. //border-collapse:collapse!important;
  191. margin-top: 0!important;
  192. background-color: $table-bg;
  193. //border-radius: $card-border-radius;
  194. }
  195. table.custom-data-table thead th {
  196. //border-top: 1px solid $table-border-color;
  197. //border-bottom: 2px solid $table-border-color;
  198. height: 42px;
  199. vertical-align: middle;
  200. //background: $white;
  201. }
  202. .custom-data-table tbody td {
  203. border-top: 1px solid $table-border-color;
  204. height: $table-td-height;
  205. }
  206. .custom-data-table tbody tr:first-child td {
  207. border-top: 0
  208. }
  209. table.custom-data-table tbody tr {
  210. box-shadow: none;
  211. }
  212. .quick-create td {
  213. background: #f7f7f9 !important;
  214. border-radius: 0;
  215. }
  216. }
  217. }
  218. body.dark-mode {
  219. .table-collapse {
  220. table {
  221. border-spacing: 0 0.24rem;
  222. }
  223. table.custom-data-table.data-table tbody td {
  224. height: 38px;
  225. }
  226. .table.custom-data-table {
  227. padding: 5px 10px 10px;
  228. }
  229. .table-fixed-left .table.custom-data-table {
  230. padding: 5px 0 0 10px;
  231. }
  232. .table-fixed-right .table.custom-data-table {
  233. padding: 5px 10px 0 0;
  234. }
  235. }
  236. //.table-fixed-left .table.custom-data-table {
  237. // padding: 5px 0 0 10px;
  238. //}
  239. //.table-fixed-right .table.custom-data-table {
  240. // padding: 5px 10px 0 0;
  241. //}
  242. }