calendar.axml 1.7 KB

12345678910111213141516171819202122
  1. <import-sjs from='./index.sjs' name='computed'>
  2. </import-sjs><template name='calendar' ref='saveChildRef0'>
  3. <view class='van-calendar'>
  4. <header title='{{ title }}' showTitle='{{ showTitle }}' subtitle='{{ subtitle }}' showSubtitle='{{ showSubtitle }}'>
  5. <slot name='title' slot='title'>
  6. </slot>
  7. </header>
  8. <scroll-view class='van-calendar__body' scroll-y=" " scroll-into-view='{{ scrollIntoView }}'>
  9. <month a:for='{{ computed.getMonths(minDate, maxDate) }}' a:key='{{index}}' id='month{{ index }}' class='month' data-date='{{ item }}' date='{{ item }}' type='{{ type }}' color='{{ color }}' minDate='{{ minDate }}' maxDate='{{ maxDate }}' showMark='{{ showMark }}' onFormatter='onFormatter' rowHeight='{{ rowHeight }}' currentDate='{{ currentDate }}' showSubtitle='{{ showSubtitle }}' allowSameDay='{{ allowSameDay }}' showMonthTitle="{{ typeof index === 'number' || !showSubtitle }}" ref-numbers='{{ computed.getMonths(minDate, maxDate) }}' onClick='onClickDay'>
  10. </month>
  11. </scroll-view>
  12. <view class="van-calendar__footer {{ safeAreaInsetBottom ? 'van-calendar__footer--safe-area-inset-bottom' : '' }}">
  13. <slot name='footer'>
  14. </slot>
  15. </view>
  16. <view class="van-calendar__footer {{ safeAreaInsetBottom ? 'van-calendar__footer--safe-area-inset-bottom' : '' }}">
  17. <van-button a:if='{{ showConfirm }}' round=" " block=" " type='danger' color='{{ color }}' custom-class='van-calendar__confirm' disabled='{{ computed.getButtonDisabled(type, currentDate) }}' nativeType='text' onClick='onConfirm'>
  18. {{ computed.getButtonDisabled(type, currentDate) ? confirmDisabledText : confirmText }}
  19. </van-button>
  20. </view>
  21. </view>
  22. </template>