_table.scss 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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. }