xx-calendar.wxml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <!--components/xx-calendar/xx-calendar.wxml-->
  2. <!-- 头部 -->
  3. <view class="title-wrap">
  4. <view class="change-date">
  5. <view class="prev" bindtap="changeMonthFun" data-type="prev">
  6. <image src="./prev.png" mode="" />
  7. </view>
  8. <view class="year-mouth">
  9. {{year}}年 {{month}}月
  10. </view>
  11. <view clstyle="next" bindtap="changeMonthFun" data-type="next">
  12. <image src="./next.png" mode="" />
  13. </view>
  14. </view>
  15. <view class="week">
  16. <text wx:for="{{weeksArr}}" wx:key="*this">{{item}}</text>
  17. </view>
  18. </view>
  19. <!-- 日期 -->
  20. <view class="date-wrap">
  21. <!-- 上个月日期 -->
  22. <view wx:for="{{lastMonthDays}}" wx:key="*this" class="mouth-date last-mouth">
  23. <text class="day-text">{{item.date}}</text>
  24. <!-- 农历还未配置,不用管,你可以二开这个组件,因为我们的设计图不显示上下月的日期,故不渲染也可以 -->
  25. <text class="day-nongli">十五</text>
  26. <text class="day-dot"></text>
  27. </view>
  28. <!-- 当月日期 -->
  29. <view class="mouth-date current-mouth" wx:for="{{nowMonthDays}}" wx:key="*this" bindtap="selectDate"
  30. data-item="{{item}}" data-type="nowMonthDays" data-index="{{index}}"
  31. >
  32. <view class="day-box {{item.isNowMonthDay?'active':''}}">
  33. <text class="day-text {{item.color?'color':''}}">{{item.date}}</text>
  34. <!-- day 后面会换成农历展示 -->
  35. <text class="day-nongli">{{item.day}}</text>
  36. <text class=" {{item.color?'day-dot':'not-dot'}}"></text>
  37. </view>
  38. </view>
  39. <!-- 下个月日期 -->
  40. <view class="mouth-date next-mouth" wx:for="{{nextMonthDays}}" wx:key="*this">
  41. <text class="day-text">{{item.date}}</text>
  42. <!-- 农历还未配置,不用管,你可以二开这个组件,因为我们的设计图不显示上下月的日期,故不渲染也可以 -->
  43. <text class="day-nongli">十五</text>
  44. <text class="day-dot"></text>
  45. </view>
  46. </view>