123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <wxs
- src="./helper.wxs"
- module="helper" />
- <wxs
- src="./scroll.wxs"
- module="scroll" />
- <view
- class="ant-calendar {{ className ? className : '' }}"
- style="{{ style }}">
- <view class="ant-calendar-mark">
- <block
- wx:for="{{ markItems }}"
- wx:for-index="index"
- wx:for-item="item">
- <view class="{{ helper.getMarkCellClassName(index, markItems) }}">
- <!-- display: inline -->
- <text>{{ item }}</text>
- </view>
- </block>
- </view>
- <view
- wx:if="{{ !!elementSize }}"
- class="ant-calendar-sticky">
- <view class="ant-calendar-sticky-title">
- <view class="ant-calendar-title">{{ monthList[headerState].title }}</view>
- </view>
- </view>
- <scroll-view
- scroll-y="{{ true }}"
- class="ant-calendar-body"
- data-elementsize="{{ elementSize }}"
- data-monthlist="{{ monthList }}"
- bind:scroll="{{ scroll.handleScroll }}"
- bind:ref="handleRef">
- <block
- wx:for="{{ monthList }}"
- wx:for-index="index"
- wx:for-item="currentMonth">
- <view class="ant-calendar-body-container">
- <view class="ant-calendar-title-container">
- <view class="ant-calendar-title">{{ currentMonth.title }}</view>
- </view>
- <view class="ant-calendar-cells">
- <block
- wx:for="{{ currentMonth.cells }}"
- wx:for-index="index"
- wx:for-item="item">
- <block>
- <view
- class="{{ helper.getClassName(item, index) }}"
- data-time="{{ item }}"
- bind:tap="clickCell">
- <view class="ant-calendar-cell-container">
- <view class="ant-calendar-cell-top">
- <!-- display: inline -->
- <text
- wx:if="{{ item.top }}"
- class="ant-calendar-cell-top-text {{ item.top.className ? item.top.className : '' }}"
- >{{ item.top.label }}</text
- >
- </view>
- <view class="ant-calendar-cell-center">{{ item.date }}</view>
- <view class="ant-calendar-cell-bottom">
- <!-- display: inline -->
- <text
- wx:if="{{ item.bottom }}"
- class="{{ item.bottom.className }}"
- >{{ item.bottom.label }}</text
- >
- </view>
- </view>
- </view>
- <view
- wx:if="{{ index % 7 !== 6 }}"
- class="{{ helper.getSpaceClassName(index, currentMonth.cells) }}" />
- </block>
- </block>
- </view>
- </view>
- </block>
- </scroll-view>
- </view>
|