_table.scss 5.8 KB

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