_table.scss 6.7 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.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. .custom-data-table.dataTable tbody tr td:first-child {
  147. border-top-left-radius: 0;
  148. border-bottom-left-radius: 0;
  149. }
  150. .custom-data-table.dataTable tbody tr td:last-child{
  151. border-top-right-radius: 0;
  152. border-bottom-right-radius: 0;
  153. }
  154. .custom-data-table.dataTable tbody tr:first-child td:first-child {
  155. border-top-left-radius: $card-border-radius;
  156. }
  157. .custom-data-table.dataTable tbody tr:first-child td:last-child{
  158. border-top-right-radius: $card-border-radius;
  159. }
  160. .custom-data-table.dataTable tbody tr:last-child td:first-child {
  161. border-bottom-left-radius: $card-border-radius;
  162. }
  163. .custom-data-table.dataTable tbody tr:last-child td:last-child{
  164. border-bottom-right-radius: $card-border-radius;
  165. }
  166. .table.custom-data-table {
  167. padding: 3px 6px 6px;
  168. }
  169. .table-fixed-left .table.custom-data-table {
  170. padding: 3px 0 0 6px;
  171. }
  172. .table-fixed-right .table.custom-data-table {
  173. padding: 3px 6px 0 0;
  174. }
  175. .table-fixed th {
  176. background: darken(#f7f7f9, 3.5%);
  177. }
  178. }
  179. $table-bg: darken(#f7f7f9, 3.5%);
  180. body:not(.dark-mode) {
  181. .table-collapse {
  182. box-shadow: $shadow;
  183. background: $table-bg;
  184. margin-top: 1rem;
  185. .custom-data-table {
  186. border-spacing: 0;
  187. //border-collapse:collapse!important;
  188. margin-top: 0!important;
  189. background-color: $table-bg;
  190. //border-radius: $card-border-radius;
  191. }
  192. table.custom-data-table.dataTable thead th {
  193. //border-top: 1px solid $table-border-color;
  194. //border-bottom: 2px solid $table-border-color;
  195. height: 24px;
  196. vertical-align: middle;
  197. //background: $white;
  198. }
  199. .custom-data-table.dataTable tbody td {
  200. border-top: 1px solid $table-border-color;
  201. height: 45px;
  202. }
  203. .custom-data-table.dataTable tbody tr:first-child td {
  204. border-top: 0
  205. }
  206. table.custom-data-table.dataTable tbody tr {
  207. box-shadow: none;
  208. }
  209. .quick-create td {
  210. background: #f7f7f9 !important;
  211. border-radius: 0;
  212. }
  213. }
  214. }
  215. body.dark-mode {
  216. .table-collapse {
  217. table {
  218. border-spacing: 0 0.24rem;
  219. }
  220. table.custom-data-table.dataTable tbody td {
  221. height: 38px;
  222. }
  223. .table.custom-data-table {
  224. padding: 5px 10px 10px;
  225. }
  226. .table-fixed-left .table.custom-data-table {
  227. padding: 5px 0 0 10px;
  228. }
  229. .table-fixed-right .table.custom-data-table {
  230. padding: 5px 10px 0 0;
  231. }
  232. }
  233. //.table-fixed-left .table.custom-data-table {
  234. // padding: 5px 0 0 10px;
  235. //}
  236. //.table-fixed-right .table.custom-data-table {
  237. // padding: 5px 10px 0 0;
  238. //}
  239. }