_table.scss 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  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. thead th {
  99. vertical-align: middle;
  100. font-size: 1rem!important;
  101. }
  102. tbody tr {
  103. box-shadow: none;
  104. border-radius: 0;
  105. td {
  106. border-bottom: 1px solid lighten($table-border-color, 4%);
  107. border-right: 1px solid lighten($table-border-color, 4%);
  108. }
  109. td:first-child {
  110. border-top-left-radius: 0;
  111. border-bottom-left-radius: 0;
  112. }
  113. td:last-child {
  114. border-top-right-radius: 0;
  115. border-bottom-right-radius: 0;
  116. border-right: 0;
  117. }
  118. }
  119. tbody tr:last-child td {
  120. border-bottom: 0;
  121. }
  122. }
  123. .table-hover tbody tr:hover {
  124. color: $font-color;
  125. background-color: lighten($dark30, 1%);
  126. }
  127. /*--------------------------------------------------- */
  128. .table.default-table {
  129. tr {
  130. box-shadow: none!important;
  131. }
  132. td {
  133. border-top: 1px solid #f0f4f8!important;
  134. border-radius: 0!important;
  135. }
  136. thead th {
  137. border-bottom: 2px solid #f0f4f8!important;
  138. }
  139. }
  140. .table.default-table.table-bordered th, .table.default-table.table-bordered td {
  141. border: 1px solid #f0f4f8!important;
  142. }
  143. $table-border-color: #eff3f8;
  144. .table-collapse {
  145. table.custom-data-table.dataTable tbody tr td:first-child {
  146. border-top-left-radius: 0;
  147. border-bottom-left-radius: 0;
  148. }
  149. table.custom-data-table.dataTable tbody tr td:last-child{
  150. border-top-right-radius: 0;
  151. border-bottom-right-radius: 0;
  152. }
  153. .table.custom-data-table {
  154. padding: 5px 10px 10px;
  155. }
  156. .table-fixed-left .table.custom-data-table {
  157. padding: 5px 0 0 10px;
  158. }
  159. .table-fixed-right .table.custom-data-table {
  160. padding: 5px 10px 0 0;
  161. }
  162. .table-fixed th {
  163. background: darken(#f7f7f9, 3.5%);
  164. }
  165. }
  166. body:not(.dark-mode) {
  167. .table-collapse {
  168. box-shadow: $shadow;
  169. background: darken(#f7f7f9, 3.5%);
  170. margin-top: 1rem;
  171. .custom-data-table {
  172. border-spacing: 0;
  173. //border-collapse:collapse!important;
  174. margin-top: 0!important;
  175. background-color: darken(#f7f7f9, 3.5%);
  176. //border-radius: $card-border-radius;
  177. }
  178. table.custom-data-table.dataTable thead th {
  179. //border-top: 1px solid $table-border-color;
  180. //border-bottom: 2px solid $table-border-color;
  181. height: 24px;
  182. vertical-align: middle;
  183. //background: $white;
  184. }
  185. table.custom-data-table.dataTable tbody td {
  186. border-top: 1px solid $table-border-color;
  187. height: 38px;
  188. }
  189. table.custom-data-table.dataTable tbody tr {
  190. box-shadow: none;
  191. }
  192. .quick-create td {
  193. background: #f7f7f9 !important;
  194. border-radius: 0;
  195. }
  196. }
  197. }
  198. body.dark-mode {
  199. .table-collapse {
  200. table {
  201. border-spacing: 0 0.24rem;
  202. }
  203. table.custom-data-table.dataTable tbody td {
  204. height: 38px;
  205. }
  206. }
  207. //.table-fixed-left .table.custom-data-table {
  208. // padding: 5px 0 0 10px;
  209. //}
  210. //.table-fixed-right .table.custom-data-table {
  211. // padding: 5px 10px 0 0;
  212. //}
  213. }