index.scss 2.4 KB

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