time-select.wxss 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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. }
  89. .day-status {
  90. font-size: 24rpx;
  91. text-align: center;
  92. white-space: nowrap;
  93. overflow: hidden;
  94. text-overflow: ellipsis;
  95. max-width: 100%;
  96. line-height: 1.2;
  97. padding: 0 2rpx;
  98. }
  99. .day-cell.other-month {
  100. color: #ccc;
  101. display: none;
  102. }
  103. .day-cell.past {
  104. color: #999;
  105. }
  106. /* 可用日期样式 */
  107. .day-cell.available .day-number,
  108. .day-cell.available .day-status {
  109. color: #8B5D3B;
  110. }
  111. /* 今天的特殊样式 */
  112. .day-cell.today .day-number {
  113. color: #8B5D3B;
  114. font-weight: bold;
  115. }
  116. /* 不可用日期样式 */
  117. .day-cell.unavailable .day-status {
  118. color: rgba(88, 71, 53, 0.5);
  119. }
  120. /* 闭馆 */
  121. .day-cell.closed .day-status {
  122. color: rgba(88, 71, 53, 0.5);
  123. }
  124. /* 已约满日期样式 */
  125. .day-cell.full .day-status {
  126. color: #B1967B;
  127. }
  128. /* 选中状态样式 - 最高优先级 */
  129. .day-cell.selected {
  130. background: #B1967B !important;
  131. transform: scale(1.08);
  132. transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  133. z-index: 10;
  134. position: relative;
  135. }
  136. .day-cell.selected .day-number {
  137. color: #fff !important;
  138. font-weight: bold;
  139. }
  140. .day-cell.selected .day-status {
  141. color: #fff !important;
  142. font-weight: 500;
  143. }
  144. /* 可选择日期的悬停效果 */
  145. .day-cell.selectable:not(.selected) {
  146. transition: all 0.2s ease;
  147. cursor: pointer;
  148. }
  149. .day-cell.selectable:not(.selected):hover {
  150. background-color: rgba(139, 93, 59, 0.2);
  151. transform: scale(1.02);
  152. }
  153. /* 选中动画效果 */
  154. @keyframes selectAnimation {
  155. 0% {
  156. transform: scale(1);
  157. }
  158. 50% {
  159. transform: scale(1.12);
  160. }
  161. 100% {
  162. transform: scale(1.08);
  163. }
  164. }
  165. .day-cell.selected {
  166. animation: selectAnimation 0.3s ease-out;
  167. }
  168. /* 空白单元格样式 */
  169. .day-cell.empty-cell {
  170. background: transparent;
  171. cursor: default;
  172. pointer-events: none;
  173. }