sign.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <style scoped lang="scss">
  2. .step{
  3. width: 100%;
  4. height: auto;
  5. padding: 10upx 30upx;
  6. box-sizing: border-box;
  7. overflow: hidden;
  8. background-color: #fff;
  9. color: #666;
  10. margin-bottom: 20upx;
  11. .modle {
  12. width: 100%;
  13. height: 100upx;
  14. margin-top: 10upx;
  15. .mol {
  16. width: 100%;
  17. height: 52upx;
  18. position: relative;
  19. .mol-line {
  20. width: 100%;
  21. height: 4upx;
  22. background-color: #e6e6e6;
  23. position: absolute;
  24. left: 0;
  25. top: 50%;
  26. transform: translateY(-50%);
  27. }
  28. .mol-ites {
  29. width: 100%;
  30. height: 100%;
  31. position: absolute;
  32. .ite {
  33. width: 52upx;
  34. height: 52upx;
  35. border-radius: 50%;
  36. border: 1upx solid #f5f5f5;
  37. background-color: #fff;
  38. box-sizing: border-box;
  39. position: absolute;
  40. left: 0;
  41. top: 0;
  42. z-index: 2;
  43. .n {
  44. width: 44upx;
  45. height: 44upx;
  46. line-height: 44upx;
  47. text-align: center;
  48. border-radius: 50%;
  49. background-color: #f5f5f5;
  50. position: absolute;
  51. left: 50%;
  52. top: 50%;
  53. transform: translate(-50%, -50%);
  54. font-size: 22upx;
  55. }
  56. }
  57. .ite::after {
  58. content: "";
  59. width: 80upx;
  60. height: 4upx;
  61. background-color: transparent;
  62. position: absolute;
  63. left: 52upx;
  64. top: 50%;
  65. margin-top: -2upx;
  66. z-index: 2;
  67. }
  68. .ite:last-of-type::after {
  69. width: 0;
  70. }
  71. .ite:nth-of-type(2) {
  72. left: 107upx;
  73. }
  74. .ite:nth-of-type(3) {
  75. left: 214upx;
  76. }
  77. .ite:nth-of-type(4) {
  78. left: 321upx;
  79. }
  80. .ite:nth-of-type(5) {
  81. left: 428upx;
  82. }
  83. .ite:nth-of-type(6) {
  84. left: 535upx;
  85. }
  86. .ite:nth-of-type(7) {
  87. left: 642upx;
  88. }
  89. .hover {
  90. border-color: rgb(97, 165, 238);
  91. .n {
  92. background-color: rgb(97, 165, 238);
  93. color: #fff;
  94. }
  95. }
  96. .hover::after {
  97. background-color: rgb(97, 165, 238);
  98. }
  99. }
  100. }
  101. .moday {
  102. width: 100%;
  103. height: 40upx;
  104. overflow: hidden;
  105. position: relative;
  106. margin-top: 16upx;
  107. .dd {
  108. width: 52upx;
  109. height: 40upx;
  110. line-height: 1;
  111. text-align: center;
  112. font-size: 22upx;
  113. position: absolute;
  114. left: 0;
  115. bottom: 0;
  116. }
  117. .dd:nth-of-type(2) {
  118. left: 107upx;
  119. }
  120. .dd:nth-of-type(3) {
  121. left: 214upx;
  122. }
  123. .dd:nth-of-type(4) {
  124. left: 321upx;
  125. }
  126. .dd:nth-of-type(5) {
  127. left: 428upx;
  128. }
  129. .dd:nth-of-type(6) {
  130. left: 535upx;
  131. }
  132. .dd:nth-of-type(7) {
  133. left: 642upx;
  134. }
  135. }
  136. }
  137. }
  138. </style>
  139. <template>
  140. <view class='step'>
  141. <view class='modle'>
  142. <view class='mol'>
  143. <view class='mol-line'></view>
  144. <view class='mol-ites'>
  145. <view class="ite" :class="signNum >= min ? 'hover':''" :data-n='min'>
  146. <label class='n'>+{{min < 7 ? 1 : 3}}</label>
  147. </view>
  148. <view class="ite" :class="signNum >= min+1 ? 'hover':''" :data-n='min+1'>
  149. <label class='n'>+{{min+1 < 7?1:3}}</label>
  150. </view>
  151. <view class="ite" :class="signNum >= min+2 ? 'hover':''" :data-n='min+2'>
  152. <label class='n'>+{{min+2 < 7 ? 1:3}}</label>
  153. </view>
  154. <view class="ite" :class="signNum >= min+3 ? 'hover':''" :data-n='min+3'>
  155. <label class='n'>+{{min+3 < 7 ?1:3}}</label>
  156. </view>
  157. <view class="ite" :class="signNum >= min+4 ? 'hover':''" :data-n='min+4'>
  158. <label class='n'>+{{min+4 < 7 ? 1:3}}</label>
  159. </view>
  160. <view class="ite" :class="signNum >= min+5 ? 'hover':''" :data-n='min+5'>
  161. <label class='n'>+{{min+5 < 7 ? 1:3}}</label>
  162. </view>
  163. <view class="ite" :class="signNum >= min+6 ? 'hover':''" :data-n='max'>
  164. <label class='n'>+{{min+6 < 7 ? 1:3}}</label>
  165. </view>
  166. </view>
  167. </view>
  168. <view class='moday'>
  169. <label class='dd'>{{min}}天</label>
  170. <label class='dd'>{{min+1}}天</label>
  171. <label class='dd'>{{min+2}}天</label>
  172. <label class='dd'>{{min+3}}天</label>
  173. <label class='dd'>{{min+4}}天</label>
  174. <label class='dd'>{{min+5}}天</label>
  175. <label class='dd'>{{max}}天</label>
  176. </view>
  177. </view>
  178. </view>
  179. </template>
  180. <script>
  181. export default {
  182. data() {
  183. return {
  184. min: 1, //默认值日期第一天1
  185. max: 7, //默认值日期最后一天7
  186. be: 0, //默认倍数
  187. }
  188. },
  189. props:{
  190. signNum:Number
  191. },
  192. onShow() {
  193. console.log(this.signNum)
  194. }
  195. }
  196. </script>