_table.scss 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. }
  48. .custom-data-table-header .table-responsive {
  49. overflow: visible!important;
  50. padding-bottom: 0!important;
  51. }
  52. .sticky-table-header {
  53. z-index: 45!important;
  54. }
  55. // 解决 rwd-table 下拉选框显示bug
  56. table.table-bordered.dataTable:not(.complex-headers) tbody th, table.table-bordered.dataTable tbody td {
  57. border-bottom-width: 1px
  58. }
  59. table.table-bordered.dataTable th:not(.complex-headers), table.table-bordered.dataTable td {
  60. border-left-width: 1px;
  61. }
  62. 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 {
  63. border-right-width: 1px;
  64. }
  65. table.dataTable.complex-headers {
  66. border: 1px solid $table-border-color;
  67. }
  68. table.dataTable.complex-headers thead th, table.dataTable.complex-headers thead td, table.dataTable.complex-headers tfoot th, table.dataTable.complex-headers tfoot td {
  69. border-bottom: 1px solid $table-border-color;
  70. border-right: 1px solid $table-border-color;
  71. }
  72. .dataTable.table-bordered:not(.complex-headers) thead th {
  73. border-right: 1px solid darken($border-color, 3%);
  74. border-bottom: 1px solid darken($border-color, 3%);
  75. }
  76. .dataTable.table-bordered:not(.complex-headers) tr:first-child th {
  77. border-top: 1px solid darken($border-color, 3%);
  78. }
  79. .dataTable.table-bordered:not(.complex-headers) thead tr th:first-child {
  80. border-left: 1px solid darken($border-color, 3%);
  81. }
  82. /* ------------------- 多表头 --------------------- */
  83. table.table-bordered.dataTable.complex-headers {
  84. border-spacing: 0;
  85. thead th {
  86. text-align: center;
  87. vertical-align: middle;
  88. font-size: 1rem!important;
  89. }
  90. tbody tr {
  91. box-shadow: none;
  92. border-radius: 0;
  93. td {
  94. border-bottom: 1px solid lighten($table-border-color, 4%);
  95. border-right: 1px solid lighten($table-border-color, 4%);
  96. }
  97. td:first-child {
  98. border-top-left-radius: 0;
  99. border-bottom-left-radius: 0;
  100. }
  101. td:last-child {
  102. border-top-right-radius: 0;
  103. border-bottom-right-radius: 0;
  104. border-right: 0;
  105. }
  106. }
  107. tbody tr:last-child td {
  108. border-bottom: 0;
  109. }
  110. }
  111. .table-hover tbody tr:hover {
  112. color: $font-color;
  113. background-color: lighten($dark30, 1%);
  114. }