1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <wux-popup position="bottom" visible="{{ in }}" zIndex="1010" safeArea="bottom" bind:close="close">
- <view class="wux-class {{ classes.wrap }}">
- <view class="{{ classes.content }}">
- <view class="{{ classes.hd }}" wx:if="{{ toolbar }}">
- <view class="{{ classes.toolbar }}">
- <view class="{{ classes.picker }}">
- <view class="{{ classes.link }}" bindtap="prevMonth">
- <view class="{{ classes.prev }}"></view>
- </view>
- <view class="{{ classes.value }}">{{ currentMonthName }}</view>
- <view class="{{ classes.link }}" bindtap="nextMonth">
- <view class="{{ classes.next }}"></view>
- </view>
- </view>
- <view class="{{ classes.picker }}">
- <view class="{{ classes.link }}" bindtap="prevYear">
- <view class="{{ classes.prev }}"></view>
- </view>
- <text class="{{ classes.value }}">{{ currentYear }}</text>
- <view class="{{ classes.link }}" bindtap="nextYear">
- <view class="{{ classes.next }}"></view>
- </view>
- </view>
- </view>
- </view>
- <view class="{{ classes.bd }}">
- <view class="{{ classes.weekdays }}" wx:if="{{ weekHeader }}">
- <block wx:for="{{ weeks }}" wx:for-item="week" wx:for-index="weekIndex" wx:key="weekIndex">
- <view class="{{ classes.weekday }} {{ week.weekend ? prefixCls + '__weekday--weekend' : '' }}">
- {{ week.dayName }}
- </view>
- </block>
- </view>
- <view class="{{ classes.months }}">
- <view class="{{ classes.monthsContent }}" bindtouchstart="onTouchStart" catchtouchmove="{{ swiping ? 'noop' : '' }}" capture-bind:touchmove="onTouchMove" bindtouchend="onTouchEnd" style="{{ wrapperTranslate }}">
- <block wx:for="{{ months }}" wx:for-item="month" wx:for-index="monthIndex" wx:key="monthIndex">
- <view
- data-year="{{ month.year }}"
- data-month="{{ month.month }}"
- class="{{ classes.month }} {{ monthIndex === 0 ? (prefixCls + '__month--prev') : monthIndex === 1 ? (prefixCls + '__month--current') : (prefixCls + '__month--next') }}"
- style="{{ monthsTranslate[monthIndex] }}"
- >
- <block wx:for="{{ month.items }}" wx:for-item="row" wx:for-index="rowIndex" wx:key="rowIndex">
- <view class="{{ classes.days }}">
- <block wx:for="{{ row }}" wx:for-item="col" wx:for-index="colIndex" wx:key="colIndex">
- <view
- data-year="{{ col.year }}"
- data-month="{{ col.month }}"
- data-day="{{ col.day }}"
- data-date="{{ col.date }}"
- data-type="{{ col.type }}"
- class="{{ classes.day }} {{ col.type.prev ? prefixCls + '__day--prev' : '' }} {{ col.type.next ? prefixCls + '__day--next' : '' }} {{ col.type.today ? prefixCls + '__day--today' : '' }} {{ col.type.selected ? prefixCls + '__day--selected' : '' }} {{ col.type.weekend ? prefixCls + '__day--weekend' : '' }} {{ col.type.disabled ? prefixCls + '__day--disabled' : '' }}"
- bindtap="onDayClick"
- >
- <text class="{{ classes.text }}">{{ col.day }}</text>
- </view>
- </block>
- </view>
- </block>
- </view>
- </block>
- </view>
- </view>
- </view>
- </view>
- </view>
- </wux-popup>
|