index.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. ::v-deep .custom-table {
  2. // width: 100%;
  3. // height: calc(100vh - 380rpx);
  4. &__require {
  5. color: #ff4949;
  6. margin-right: 4rpx;
  7. }
  8. &__load-more {
  9. display: flex;
  10. justify-content: center;
  11. align-items: center;
  12. padding: 30rpx 0;
  13. color: #909399;
  14. font-size: 24rpx;
  15. border-top: 1rpx solid #e4e7ed;
  16. }
  17. &__load-more-text {
  18. margin: 0 10rpx;
  19. }
  20. &__body {
  21. // height: calc(100vh - 380rpx);
  22. overflow: auto;
  23. }
  24. }
  25. ::v-deep .uni-table {
  26. width: 100%;
  27. border-radius: 8rpx;
  28. overflow: hidden;
  29. border: 1rpx solid #e4e7ed;
  30. .uni-table__body {
  31. overflow: auto;
  32. }
  33. .uni-th {
  34. background-color: #f5f7fa;
  35. font-weight: 600;
  36. font-size: 26rpx;
  37. color: #303133;
  38. padding: 30rpx 20rpx;
  39. text-align: center;
  40. border-right: 1rpx solid #e4e7ed;
  41. border-bottom: 1rpx solid #e4e7ed;
  42. position: sticky;
  43. top: 0;
  44. z-index: 10;
  45. box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.05);
  46. }
  47. .uni-td {
  48. padding: 0 20rpx;
  49. font-size: 24rpx;
  50. color: #606266;
  51. text-align: center;
  52. border-right: 1rpx solid #e4e7ed;
  53. border-bottom: 1rpx solid #e4e7ed;
  54. height: 120rpx;
  55. display: flex;
  56. align-items: center;
  57. justify-content: center;
  58. > * {
  59. display: -webkit-box;
  60. -webkit-line-clamp: 2;
  61. -webkit-box-orient: vertical;
  62. overflow: hidden;
  63. text-overflow: ellipsis;
  64. width: 100%;
  65. text-align: center;
  66. }
  67. }
  68. .uni-tr {
  69. border-bottom: 1rpx solid #e4e7ed;
  70. &:hover {
  71. background-color: #fafafa;
  72. }
  73. }
  74. // 移除默认边框和线条
  75. .uni-table__header::after {
  76. display: none;
  77. }
  78. .uni-table__body::after {
  79. display: none;
  80. }
  81. // 最后一列移除右边框
  82. .uni-tr .uni-th:last-child,
  83. .uni-tr .uni-td:last-child {
  84. border-right: none;
  85. }
  86. // 最后一行移除下边框
  87. .uni-tr:last-child .uni-td {
  88. border-bottom: none;
  89. }
  90. // 支持斑马线样式
  91. .uni-tr:nth-child(even) {
  92. background-color: #fafafa;
  93. }
  94. }
  95. // 滚动条样式
  96. ::v-deep .uni-table ::-webkit-scrollbar {
  97. width: 6rpx;
  98. height: 6rpx;
  99. }
  100. ::v-deep .uni-table ::-webkit-scrollbar-track {
  101. background: #f1f1f1;
  102. }
  103. ::v-deep .uni-table ::-webkit-scrollbar-thumb {
  104. background: #c1c1c1;
  105. border-radius: 3rpx;
  106. }
  107. ::v-deep .uni-table ::-webkit-scrollbar-thumb:hover {
  108. background: #a8a8a8;
  109. }