index.wxss 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. .time-select-container {
  2. width: 100%;
  3. max-width: 100%;
  4. border-radius: 16rpx;
  5. font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  6. overflow-x: hidden;
  7. }
  8. .time-select-header {
  9. display: flex;
  10. justify-content: space-between;
  11. align-items: center;
  12. margin-bottom: 30rpx;
  13. }
  14. .time-select-title {
  15. font-size: 32rpx;
  16. color: #584735;
  17. font-weight: bold;
  18. }
  19. .month-selector {
  20. display: flex;
  21. align-items: center;
  22. color: #94765A;
  23. }
  24. .current-month {
  25. margin: 0 20rpx;
  26. font-size: 32rpx;
  27. font-weight: 500;
  28. }
  29. .arrow {
  30. font-size: 36rpx;
  31. width: 48rpx;
  32. height: 48rpx;
  33. display: flex;
  34. align-items: center;
  35. justify-content: center;
  36. color: #8B5D3B;
  37. }
  38. .arrow-icon {
  39. width: 48rpx;
  40. height: 48rpx;
  41. }
  42. .weekdays {
  43. display: grid;
  44. grid-template-columns: repeat(7, 1fr);
  45. text-align: center;
  46. margin-bottom: 20rpx;
  47. width: 100%;
  48. max-width: 100%;
  49. box-sizing: border-box;
  50. }
  51. .weekday {
  52. font-size: 28rpx;
  53. color: #584735;
  54. font-weight: bold;
  55. padding: 10rpx 4rpx;
  56. text-align: center;
  57. min-width: 0;
  58. box-sizing: border-box;
  59. }
  60. .days-grid {
  61. display: grid;
  62. grid-template-columns: repeat(7, 1fr);
  63. gap: 4rpx;
  64. width: 100%;
  65. max-width: 100%;
  66. box-sizing: border-box;
  67. }
  68. .day-cell {
  69. aspect-ratio: 1;
  70. display: flex;
  71. flex-direction: column;
  72. align-items: center;
  73. justify-content: center;
  74. border-radius: 8rpx;
  75. position: relative;
  76. padding: 6rpx 2rpx;
  77. min-width: 0;
  78. box-sizing: border-box;
  79. overflow: hidden;
  80. transition: all 0.2s ease;
  81. }
  82. .day-number {
  83. font-size: 28rpx;
  84. font-weight: 500;
  85. margin-bottom: 2rpx;
  86. color: #584735;
  87. text-align: center;
  88. line-height: 1.2;
  89. }
  90. .day-status {
  91. font-size: 24rpx;
  92. text-align: center;
  93. white-space: nowrap;
  94. overflow: hidden;
  95. text-overflow: ellipsis;
  96. max-width: 100%;
  97. line-height: 1.2;
  98. padding: 0 2rpx;
  99. }
  100. .day-cell.other-month {
  101. color: #ccc;
  102. display: none;
  103. }
  104. .day-cell.past {
  105. color: #999;
  106. }
  107. /* 可用日期样式 */
  108. .day-cell.available .day-number,
  109. .day-cell.available .day-status {
  110. color: #8B5D3B;
  111. }
  112. /* 今天的特殊样式 */
  113. .day-cell.today .day-number {
  114. color: #8B5D3B;
  115. font-weight: bold;
  116. }
  117. /* 不可用日期样式 */
  118. .day-cell.unavailable .day-status {
  119. color: rgba(88, 71, 53, 0.5);
  120. }
  121. /* 已约满日期样式 */
  122. .day-cell.full .day-status {
  123. color: #B1967B;
  124. }
  125. /* 选中状态样式 - 最高优先级 */
  126. .day-cell.selected {
  127. background: #B1967B !important;
  128. transform: scale(1.08);
  129. transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  130. z-index: 10;
  131. position: relative;
  132. }
  133. .day-cell.selected .day-number {
  134. color: #fff !important;
  135. font-weight: bold;
  136. }
  137. .day-cell.selected .day-status {
  138. color: #fff !important;
  139. font-weight: 500;
  140. }
  141. /* 可选择日期的悬停效果 */
  142. .day-cell.selectable:not(.selected) {
  143. transition: all 0.2s ease;
  144. cursor: pointer;
  145. }
  146. .day-cell.selectable:not(.selected):hover {
  147. background-color: rgba(139, 93, 59, 0.2);
  148. transform: scale(1.02);
  149. }
  150. /* 选中动画效果 */
  151. @keyframes selectAnimation {
  152. 0% {
  153. transform: scale(1);
  154. }
  155. 50% {
  156. transform: scale(1.12);
  157. }
  158. 100% {
  159. transform: scale(1.08);
  160. }
  161. }
  162. .day-cell.selected {
  163. animation: selectAnimation 0.3s ease-out;
  164. }
  165. /* 空白单元格样式 */
  166. .day-cell.empty-cell {
  167. background: transparent;
  168. cursor: default;
  169. pointer-events: none;
  170. }