calendar.wxml 1.5 KB

123456789101112131415161718192021222324252627282930
  1. <view class="van-calendar">
  2. <header title="{{ title }}" showTitle="{{ showTitle }}" subtitle="{{ subtitle }}" showSubtitle="{{ showSubtitle }}">
  3. <slot name="title" slot="title"></slot>
  4. </header>
  5. <scroll-view class="van-calendar__body" scroll-y scroll-into-view="{{ scrollIntoView }}">
  6. <month wx:for="{{ computed.getMonths(minDate, maxDate) }}" wx:key="index" id="month{{ index }}" class="month"
  7. data-date="{{ item }}" date="{{ item }}" type="{{ type }}" color="{{ color }}" minDate="{{ minDate }}"
  8. maxDate="{{ maxDate }}" showMark="{{ showMark }}" formatter="{{ formatter }}" rowHeight="{{ rowHeight }}"
  9. currentDate="{{ currentDate }}" showSubtitle="{{ showSubtitle }}" allowSameDay="{{ allowSameDay }}"
  10. showMonthTitle="{{ index !== 0 || !showSubtitle }}" bind:click="onClickDay" />
  11. </scroll-view>
  12. <view class="{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}">
  13. <slot name="footer"></slot>
  14. </view>
  15. <view class="{{ utils.bem('calendar__footer', { safeAreaInsetBottom }) }}">
  16. <van-button wx:if="{{ showConfirm }}" round block type="default"
  17. color="{{ 'linear-gradient( 315deg, #0ABCA4 0%, rgba(11,195,170,0.8) 100%)' }}"
  18. custom-class="van-calendar__confirm" disabled="{{ computed.getButtonDisabled(type, currentDate) }}"
  19. nativeType="text" bind:click="onConfirm">
  20. {{
  21. computed.getButtonDisabled(type, currentDate)
  22. ? confirmDisabledText
  23. : confirmText
  24. }}
  25. </van-button>
  26. </view>
  27. </view>