123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <!--components/calendar/calendar.wxml-->
- <view class="calendar">
- <view class="title flex">
- <view class="flex" style="width:700rpx;">
- <!-- <picker value="{{selectDay.year+'-'+selectDay.month}}" bindchange="editMonth" mode="date" fields="month" class="year-month">{{selectDay.year}}.{{selectDay.month>9?selectDay.month:"0"+selectDay.month}}</picker> -->
- <view class="icon" bindtap="lastMonth" >
- <!-- <view class="iconfont icon-playfill"></view> -->
- <view>
- <image src="/images/showMore.png" style="transform:rotate(180deg);"></image>
- </view>
- 上月
- </view>
- <view style="font-size:36rpx">{{curMonth}} <text style="font-size:28rpx">{{selectDay.year}}</text></view>
- <view class="icon" bindtap="nextMonth">
- <!-- <view class="iconfont icon-playfill"></view> -->
- 下月
- <view>
- <image src="/images/showMore.png"></image>
- </view>
- </view>
- </view>
- <!-- <view catchtap="openChange" class="flex open">
- <view>{{open?"收起":"展开"}}</view>
- <view style="margin-left:6rpx;font-size:20rpx" class="iconfont icon-{{open?'fold':'unfold'}}"></view>
- </view> -->
- </view>
- <!-- 日历头部 -->
- <view class="flex-around calendar-week">
- <view class="view">日</view>
- <view class="view">一</view>
- <view class="view">二</view>
- <view class="view">三</view>
- <view class="view">四</view>
- <view class="view">五</view>
- <view class="view">六</view>
- </view>
- <!-- 日历主体 -->
- <view class="flex-start flex-wrap calendar-main" style="height:{{dateList.length/7*82}}rpx">
- <view wx:for="{{dateList}}" wx:key="dateList" class="day">
- <view class="bg {{(item.year === selectDay.year && item.month === selectDay.month) ? (item.day === selectDay.day?'select':''): 'other-month'}}" catchtap="selectChange" data-day="{{item.day}}" data-year="{{item.year}}" data-month="{{item.month}}" data-date-string="{{item.dateString}}">
- {{item.day}}
- </view>
- <view class="spot" wx:if="{{item.spot}}"></view>
- </view>
- </view>
- </view>
|