index.axml 1.7 KB

12345678910111213141516171819202122232425262728293031323334
  1. <view class='month-index {{className}}' style='{{style}}' ref='saveChildRef0'>
  2. <import-sjs from='../../../wxs/utils.sjs' name='utils'>
  3. </import-sjs>
  4. <import-sjs from='./index.sjs' name='computed'>
  5. </import-sjs>
  6. <view class='van-calendar__month' style='{{ computed.getMonthStyle(visible, date, rowHeight) }}'>
  7. <view a:if='{{ showMonthTitle }}' class='van-calendar__month-title'>
  8. {{ computed.formatMonthTitle(date) }}
  9. </view>
  10. <view a:if='{{ visible }}' class='van-calendar__days'>
  11. <view a:if='{{ showMark }}' class='van-calendar__month-mark'>
  12. {{ computed.getMark(date) }}
  13. </view>
  14. <view a:for='{{ days }}' a:key='{{index}}' style='{{ computed.getDayStyle(item.type, index, date, rowHeight, color) }}' class="{{ utils.bem('calendar__day', [item.type]) }} {{ item.className }}" data-index='{{ index }}' ref-numbers='{{ days }}' onTap='antmoveAction' data-antmove-tap='onClick'>
  15. <view a:if="{{ item.type === 'selected' }}" class='van-calendar__selected-day' style='background: {{ color }}'>
  16. <view a:if='{{ item.topInfo }}' class='van-calendar__top-info'>
  17. {{ item.topInfo }}
  18. </view>
  19. {{ item.text }} <view a:if='{{ item.bottomInfo }}' class='van-calendar__bottom-info'>
  20. {{ item.bottomInfo }}
  21. </view>
  22. </view>
  23. <view a:else >
  24. <view a:if='{{ item.topInfo }}' class='van-calendar__top-info'>
  25. {{ item.topInfo }}
  26. </view>
  27. {{ item.text }} <view a:if='{{ item.bottomInfo }}' class='van-calendar__bottom-info'>
  28. {{ item.bottomInfo }}
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. </view>
  34. </view>