You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
3.3 KiB
63 lines
3.3 KiB
<!--components/xx-calendar/xx-calendar.wxml-->
|
|
<!-- 头部 -->
|
|
<view class="title-wrap">
|
|
<view class="change-date">
|
|
<view class="prev" bindtap="changeMonthFun" data-type="prev">
|
|
<image style="margin-right: 10rpx;" src="https://static.ticket.sz-trip.com/uploads/20240327/283ac46c0fab03c04dad40f765854514.png" mode="" />
|
|
<text wx:if="{{currentViewType==='month'}}">上一月</text>
|
|
<text wx:else>上一周</text>
|
|
</view>
|
|
<view class="year-mouth">
|
|
{{year}}年 {{month}}月
|
|
</view>
|
|
<view class="next" bindtap="changeMonthFun" data-type="next" >
|
|
<text wx:if="{{currentViewType==='month'}}">下一月</text>
|
|
<text wx:else>下一周 </text>
|
|
<image style="margin-left: 10rpx;" src="https://static.ticket.sz-trip.com/uploads/20240327/ab2097432f5c34915665cb376e72c4aa.png" mode="" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 日期 -->
|
|
<view class="date-wrap">
|
|
<view class="week">
|
|
<text wx:for="{{weeksArr}}" wx:key="*this">{{item}}</text>
|
|
</view>
|
|
<!-- 上个月日期 -->
|
|
<view wx:if="{{currentViewType === 'month'}}" wx:for="{{lastMonthDays}}" wx:key="*this" class="mouth-date last-mouth">
|
|
<text class="day-text">{{item.date}}</text>
|
|
</view>
|
|
|
|
|
|
<!-- 当月日期 -->
|
|
<view class="mouth-date current-mouth " wx:for="{{currentViewType === 'month' ? nowMonthDays : weekDay}}" wx:key="*this" bindtap="selectDate"
|
|
data-item="{{item}}" data-type="nowMonthDays" data-index="{{index}}"
|
|
>
|
|
<view class="day-box {{item.isNowMonthDay?'active':''}} {{item.isHoliday ? 'holiday' : ''}}{{item.isHoliday&&item.isNowMonthDay ? 'active' : ''}}" style="background: {{ item.isHoliday.background }};color: {{ item.isHoliday.color }}">
|
|
<text class="day-text">
|
|
<!-- <text class="day-text {{item.isHoliday?'color':''}} "> -->
|
|
<text>{{item.date}}</text>
|
|
<text wx:if="{{item.isHoliday}}" class="xiu" >休</text>
|
|
</text>
|
|
<!-- day 后面会换成农历展示 -->
|
|
<text class="day-nongli" wx:if="{{item.isHoliday && item.holidayList2}}" style="color: {{ item.isHoliday.color }}">{{ item.isHoliday.name}} </text>
|
|
<text class="day-nongli" wx:else="" style="color: {{ item.isHoliday ? item.isHoliday.color : '#888888' }}">{{ item.day}}</text>
|
|
<text class=" {{item.color?'day-dot':'not-dot'}}"></text>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<!-- 下个月日期 -->
|
|
<view wx:if="{{currentViewType === 'month'}}" class="mouth-date next-mouth" wx:for="{{nextMonthDays}}" wx:key="*this">
|
|
<text class="day-text">{{item.date}}</text>
|
|
</view>
|
|
|
|
<view class="footer" bindtap="toggleMode">
|
|
<!-- <view class="arrow {{currentViewType==='month'?'arrow-up':'arrow-down'}}">></view>
|
|
<view> {{currentViewType==="month"?"收起":"更多"}} </view> -->
|
|
<image wx:if="{{currentViewType==='week'}}" src="https://static.ticket.sz-trip.com/uploads/20240327/8b5f8a284de3831392560c367f8c59ca.png" mode=""/>
|
|
<image wx:else src="https://static.ticket.sz-trip.com/uploads/20240327/d23c7a3d743e4fb9623c534adf10760b.png" mode=""/>
|
|
</view>
|
|
<image wx:if="{{currentViewType==='month'}}" style="width: 180rpx;height: 157.33rpx;position: absolute;right: 0;bottom: 0;" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/calendar-bottom.png" mode=""/>
|
|
</view>
|
|
|
|
|