_table.scss 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  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-bg: #f7f7f9;
  149. .table-collapse {
  150. //table.data-table thead th {
  151. // font-weight: 500;
  152. //}
  153. .custom-data-table.data-table tbody tr td:first-child {
  154. border-top-left-radius: 0;
  155. border-bottom-left-radius: 0;
  156. }
  157. .custom-data-table.data-table tbody tr td:last-child{
  158. border-top-right-radius: 0;
  159. border-bottom-right-radius: 0;
  160. }
  161. .custom-data-table.data-table tbody tr:first-child td:first-child {
  162. border-top-left-radius: $card-border-radius;
  163. }
  164. .custom-data-table.data-table tbody tr:first-child td:last-child{
  165. border-top-right-radius: $card-border-radius;
  166. }
  167. .custom-data-table.data-table tbody tr:last-child td:first-child {
  168. border-bottom-left-radius: $card-border-radius;
  169. }
  170. .custom-data-table.data-table tbody tr:last-child td:last-child{
  171. border-bottom-right-radius: $card-border-radius;
  172. }
  173. .table.custom-data-table {
  174. padding: 3px 5px 5px;
  175. }
  176. .table-fixed-left .table.custom-data-table {
  177. padding: 3px 0 0 5px;
  178. }
  179. .table-fixed-right .table.custom-data-table {
  180. padding: 3px 5px 0 0;
  181. }
  182. .table-fixed th {
  183. background: $table-bg;
  184. }
  185. }
  186. body:not(.dark-mode) {
  187. .table-collapse {
  188. box-shadow: $shadow;
  189. background: $table-bg;
  190. margin-top: 1rem;
  191. .custom-data-table {
  192. border-spacing: 0;
  193. margin-top: 0!important;
  194. background-color: $table-bg;
  195. }
  196. table.custom-data-table thead th {
  197. height: 38px;
  198. vertical-align: middle;
  199. }
  200. .custom-data-table tbody td {
  201. border-top: 1px solid $table-border-color;
  202. height: $table-td-height;
  203. }
  204. .custom-data-table tbody tr:first-child td {
  205. border-top: 0
  206. }
  207. table.custom-data-table tbody tr {
  208. box-shadow: none;
  209. }
  210. .quick-create td {
  211. background: #f7f7f9 !important;
  212. border-radius: 0;
  213. }
  214. .table-wrap {
  215. table.custom-data-table thead th {
  216. height: 19px;
  217. }
  218. }
  219. }
  220. }
  221. body.dark-mode {
  222. .table-collapse {
  223. table {
  224. border-spacing: 0 0.24rem;
  225. }
  226. table.custom-data-table.data-table tbody td {
  227. height: 56px;
  228. }
  229. .table.custom-data-table {
  230. padding: 3px 10px 10px;
  231. }
  232. .table-fixed-left .table.custom-data-table {
  233. padding: 3px 0 0 10px;
  234. }
  235. .table-fixed-right .table.custom-data-table {
  236. padding: 3px 10px 0 0;
  237. }
  238. }
  239. //.table-fixed-left .table.custom-data-table {
  240. // padding: 5px 0 0 10px;
  241. //}
  242. //.table-fixed-right .table.custom-data-table {
  243. // padding: 5px 10px 0 0;
  244. //}
  245. }
  246. .column-selector {
  247. margin: 0 5px;
  248. .dropdown-menu {
  249. z-index: 100;
  250. }
  251. .selectors {
  252. padding: 0 1rem;
  253. height: auto;
  254. max-height: 500px;
  255. overflow-x: hidden;
  256. }
  257. }
  258. @include scrollbar('.column-selector .selectors')