_table.scss 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. .table {
  2. color: $font-color;
  3. margin-bottom: 0;
  4. }
  5. table.dataTable thead tr {
  6. background: transparent;
  7. }
  8. .table th {
  9. padding: .9rem;
  10. text-transform: capitalize;
  11. font-size: .95rem!important;
  12. }
  13. // data-list-view 表格
  14. table.data-list-view.dataTable tbody tr, table.data-thumb-view.dataTable tbody tr {
  15. box-shadow: $shadow;
  16. }
  17. table.data-list-view.dataTable thead th:first-child, table.data-thumb-view.dataTable thead th:first-child {
  18. padding-left: 1rem;
  19. }
  20. table.data-list-view.dataTable thead th, table.data-thumb-view.dataTable thead th {
  21. padding: 0.714rem .51rem;
  22. }
  23. table.dataTable:not(.table-bordered) thead tr th {
  24. text-transform: uppercase;
  25. }
  26. table.dataTable {
  27. border: 0;
  28. }
  29. table.data-list-view.dataTable, table.data-thumb-view.dataTable {
  30. border-spacing: 0 .9rem;
  31. padding: 0;
  32. }
  33. table.data-list-view.dataTable tbody tr:hover, table.data-thumb-view.dataTable tbody tr:hover, .table-hover tbody tr:hover {
  34. transform: none;
  35. background: lighten($dark30, 1%);
  36. }
  37. .table td {
  38. padding: .55rem;
  39. height: 62px;
  40. line-height: 1.42857;
  41. }
  42. table.data-list-view.dataTable tbody td, table.data-thumb-view.dataTable tbody td {
  43. height: 46px;
  44. padding: .55rem;
  45. line-height: 1.42857;
  46. }
  47. .table tr td:first-child, .table tr th:first-child {
  48. padding-left: 1.4rem;
  49. }
  50. // 快捷搜索
  51. .data-list-view-header .table-responsive .top .dataTables_filter .form-control, .data-thumb-view-header .table-responsive .top .dataTables_filter .form-control {
  52. padding: 1.23rem 2.8rem !important;
  53. border-radius: 1.4rem;
  54. border: 0;
  55. box-shadow: $shadow;
  56. }
  57. .card-header.data-list-view-header .table-responsive .top .dataTables_filter .form-control {
  58. box-shadow: $shadow-100;
  59. }
  60. .data-list-view-header .table-responsive .top .dataTables_filter label:after, .data-thumb-view-header .table-responsive .top .dataTables_filter label:after {
  61. top: 0.58rem;
  62. font-size: 1rem;
  63. left: 1.2rem;
  64. }
  65. .quick-search-clear {
  66. margin-left:-1.45rem;
  67. position: relative;
  68. color: $white;
  69. }
  70. // 解决 rwd-table 下拉选框显示bug
  71. .table-responsive {
  72. border: 0!important;
  73. margin-bottom: 0!important;
  74. }
  75. .data-list-view-header .table-responsive {
  76. overflow: visible!important;
  77. padding-bottom: 0!important;
  78. }
  79. .sticky-table-header {
  80. z-index: 45!important;
  81. }
  82. // 解决 rwd-table 下拉选框显示bug
  83. table.table-bordered.dataTable:not(.complex-headers) tbody th, table.table-bordered.dataTable tbody td {
  84. border-bottom-width: 1px
  85. }
  86. table.table-bordered.dataTable th:not(.complex-headers), table.table-bordered.dataTable td {
  87. border-left-width: 1px;
  88. }
  89. 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 {
  90. border-right-width: 1px;
  91. }
  92. table.dataTable.complex-headers {
  93. border-color: #eee;
  94. }
  95. table.dataTable.complex-headers thead th, table.dataTable.complex-headers thead td, table.dataTable.complex-headers tfoot th, table.dataTable.complex-headers tfoot td {
  96. border-bottom: 1px solid #eee;
  97. border-right: 1px solid #eee;
  98. }
  99. .dataTable.table-bordered:not(.complex-headers) thead th {
  100. border-right: 1px solid darken($border-color, 3%);
  101. border-bottom: 1px solid darken($border-color, 3%);
  102. }
  103. .dataTable.table-bordered:not(.complex-headers) tr:first-child th {
  104. border-top: 1px solid darken($border-color, 3%);
  105. }
  106. .dataTable.table-bordered:not(.complex-headers) thead tr th:first-child {
  107. border-left: 1px solid darken($border-color, 3%);
  108. }