_table.scss 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. .table {
  2. color: $font-color;
  3. margin-bottom: 0;
  4. }
  5. .table-middle {
  6. td {
  7. vertical-align: middle;
  8. }
  9. }
  10. table.dataTable thead tr {
  11. background: transparent;
  12. }
  13. .table th {
  14. padding: .9rem;
  15. text-transform: capitalize;
  16. font-size: .95rem!important;
  17. }
  18. table.dataTable thead th, table.dataTable thead td, table.dataTable tfoot th, table.dataTable tfoot td {
  19. font-size: .9rem!important;
  20. }
  21. table.dataTable:not(.table-bordered) thead tr th {
  22. text-transform: capitalize;
  23. }
  24. table.dataTable {
  25. border: 0;
  26. }
  27. .table td {
  28. padding: .55rem;
  29. //height: 62px;
  30. line-height: 1.42857;
  31. }
  32. .table tr td:first-child, .table tr th:first-child {
  33. padding-left: 1.4rem;
  34. }
  35. .card-header.custom-data-table-header .table-responsive .top .dataTables_filter .form-control {
  36. box-shadow: $shadow-100;
  37. }
  38. .quick-search-clear {
  39. margin-left:-1.45rem;
  40. position: relative;
  41. color: $white;
  42. }
  43. // 解决 rwd-table 下拉选框显示bug
  44. .table-responsive {
  45. border: 0!important;
  46. margin-bottom: 0!important;
  47. overflow-x: inherit;
  48. }
  49. .table-responsive[data-pattern=priority-columns] {
  50. overflow-y: auto!important;
  51. }
  52. .custom-data-table-header .table-responsive {
  53. overflow: visible!important;
  54. padding-bottom: 0!important;
  55. }
  56. .sticky-table-header {
  57. z-index: 45!important;
  58. }
  59. // 解决 rwd-table 下拉选框显示bug
  60. table.table-bordered.dataTable:not(.complex-headers) tbody th, table.table-bordered.dataTable tbody td {
  61. border-bottom-width: 1px
  62. }
  63. table.table-bordered.dataTable th:not(.complex-headers), table.table-bordered.dataTable td {
  64. border-left-width: 1px;
  65. }
  66. 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 {
  67. border-right-width: 1px;
  68. }
  69. table.dataTable.complex-headers {
  70. border: 1px solid $table-border-color;
  71. }
  72. table.dataTable.complex-headers thead th, table.dataTable.complex-headers thead td, table.dataTable.complex-headers tfoot th, table.dataTable.complex-headers tfoot td {
  73. border-bottom: 1px solid $table-border-color;
  74. border-right: 1px solid $table-border-color;
  75. }
  76. .dataTable.table-bordered:not(.complex-headers) thead th {
  77. border-right: 1px solid darken($border-color, 3%);
  78. border-bottom: 1px solid darken($border-color, 3%);
  79. }
  80. .dataTable.table-bordered:not(.complex-headers) tr:first-child th {
  81. border-top: 1px solid darken($border-color, 3%);
  82. }
  83. .dataTable.table-bordered:not(.complex-headers) thead tr th:first-child {
  84. border-left: 1px solid darken($border-color, 3%);
  85. }
  86. /* ------------------- 多表头 --------------------- */
  87. table.table-bordered.dataTable.complex-headers {
  88. border-spacing: 0;
  89. thead th {
  90. text-align: center;
  91. vertical-align: middle;
  92. font-size: 1rem!important;
  93. }
  94. tbody tr {
  95. box-shadow: none;
  96. border-radius: 0;
  97. td {
  98. border-bottom: 1px solid lighten($table-border-color, 4%);
  99. border-right: 1px solid lighten($table-border-color, 4%);
  100. }
  101. td:first-child {
  102. border-top-left-radius: 0;
  103. border-bottom-left-radius: 0;
  104. }
  105. td:last-child {
  106. border-top-right-radius: 0;
  107. border-bottom-right-radius: 0;
  108. border-right: 0;
  109. }
  110. }
  111. tbody tr:last-child td {
  112. border-bottom: 0;
  113. }
  114. }
  115. .table-hover tbody tr:hover {
  116. color: $font-color;
  117. background-color: lighten($dark30, 1%);
  118. }
  119. /*--------------------------------------------------- */
  120. .table.default-table {
  121. tr {
  122. box-shadow: none!important;
  123. }
  124. td {
  125. border-top: 1px solid #f0f4f8!important;
  126. border-radius: 0!important;
  127. }
  128. thead th {
  129. border-bottom: 2px solid #f0f4f8!important;
  130. }
  131. }
  132. .table.default-table.table-bordered th, .table.default-table.table-bordered td {
  133. border: 1px solid #f0f4f8!important;
  134. }