123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <view class="flex b tb ac" wx:if="{{calendar}}">
- <view class="calendar b tb">
- <!-- 头部操作栏 -->
- <view
- wx:if="{{!config.hideHeader}}"
- class="handle {{config.theme}}_handle-color fsnd b lr ac pc fsnd calendar_header">
- <view class="prev fsnd" wx:if="{{!config.weekMode}}">
- <text class="prev-handle iconfont icon-doubleleft fsnd" bindtap="changeDate" data-type="prev_month"></text>
- <!-- <text class="prev-handle iconfont icon-doubleleft fsnd" bindtap="changeDate" data-type="prev_year"></text> -->
- <!-- <text class="prev-handle iconfont icon-left" bindtap="changeDate" data-type="prev_month"></text> -->
- </view>
- <view class="calendar_title flex date-in-handle b lr cc fsnd" bindtap="doubleClickJumpToToday">
- {{calendar.curYear || "--"}} 年 {{calendar.curMonth || "--"}} 月
- </view>
- <view class="calender-search" bindtap="gotoSearch">
- <i-icon class="icon" type="search" size="26" style="color: #2563EB;"></i-icon>
- </view>
- <view class="next fsnd" wx:if="{{!config.weekMode}}">
- <!-- <text class="next-handle iconfont icon-right" bindtap="changeDate" data-type="next_month"></text> -->
- <!-- <text class="next-handle iconfont icon-doubleright" bindtap="changeDate" data-type="next_year"></text> -->
- <text class="next-handle iconfont icon-doubleright fsnd" bindtap="changeDate" data-type="next_month"></text>
- </view>
- </view>
- <!-- 星期栏 -->
- <view class="weeks b lr ac {{config.theme}}_week-color mt10">
- <!-- fsnd -->
- <view class="week" wx:for="{{calendar.weeksCh}}" wx:key="index" data-idx="{{index}}">{{item}}</view>
- </view>
- <!-- 日历面板主体 -->
- <!-- bindtouchstart="calendarTouchstart" catchtouchmove="calendarTouchmove" catchtouchend="calendarTouchend" -->
- <view class="b lr wrap calendar_body" >
- <!-- 上月日期格子 -->
- <view class="grid b ac pc {{config.theme}}_prev-month-date calendar_date" wx:for="{{calendar.prevMonthGrids}}" wx:key="index" data-idx="{{index}}">
- <view class="date-wrap b cc">
- <view class="date">
- {{item.date}}
- </view>
- </view>
- </view>
- <!-- 本月日期格子 -->
- <view wx:for="{{calendar.dates}}" wx:key="index" data-idx="{{index}}" data-info="{{item}}" bindtap="tapDate" class="grid {{item.class ? item.class : ''}} {{config.theme}}_normal-date b ac pc calendar_date">
- <view class="date-wrap b cc {{config.emphasisWeek && (item.week === 0 || item.week === 6) ? config.theme + '_weekend-color' : ''}} {{item.choosed ? 'calendar_date_choosed' : ''}}">
- <!-- {{item.choosed ? config.theme + '_choosed' : ''}} -->
- <view class="date b ac pc {{item.class ? item.class : ''}} {{item.isToday && config.highlightToday ? 'calendar_today' : ''}} {{item.disable ? config.theme + '_date-disable' : ''}} {{config.chooseAreaMode ? 'date-area-mode' : ''}} {{calendar.todoLabelCircle && item.showTodoLabel && !item.choosed ? config.theme + '_todo-circle todo-circle' : '' }}">
- {{config.markToday && item.isToday ? config.markToday : item.date}}
- <!-- <view
- wx:if="{{(config.showLunar && item.lunar && !item.showTodoLabel) || (item.showTodoLabel && calendar.todoLabelPos !== 'bottom') || config.showHolidays}}"
- class="date-desc {{config.theme}}_date-desc date-desc-bottom {{(item.choosed || item.isToday) ? 'date-desc-bottom-always' : ''}} {{item.disable ? config.theme + '_date-desc-disable' : ''}}">
- <text class="{{config.showHolidays && !item.showTodoLabel && item.label && !item.choosed ? config.theme + '_date-desc-lunar' : ''}} {{item.type === 'festival' ? config.theme + '_festival' : ''}}">{{item.label || item.lunar.Term || item.lunar.IDayCn}}</text>
- </view> -->
- <!-- <view
- wx:if="{{item.showTodoLabel && !calendar.todoLabelCircle}}"
- class="{{item.todoText ? 'date-desc' : config.theme + '_todo-dot todo-dot'}} {{config.showLunar ? config.theme + '_date-desc-lunar' : ''}} {{calendar.todoLabelPos === 'bottom' ? 'date-desc-bottom todo-dot-bottom' : 'date-desc-top todo-dot-top'}} {{calendar.showLabelAlways && item.choosed && calendar.todoLabelPos === 'bottom' ? 'date-desc-bottom-always todo-dot-bottom-always' : ''}} {{calendar.showLabelAlways && item.choosed && calendar.todoLabelPos === 'top' ? 'date-desc-top-always todo-dot-top-always' : ''}}"
- style="background-color: {{item.todoText ? '' : item.color || calendar.todoLabelColor}}; color: {{item.color}}">
- {{item.todoText}}
- </view> -->
- </view>
- <view class="calander-todos" wx:if="{{item.todoText}}">
- <view class="calander-todo" wx:for="{{item.todoText}}" wx:for-item="todo" wx:for-index="todoIndex" wx:key="todoIndex" style="background-color: {{todo && todo[1] || ''}}">
- {{todo[0]}}
- </view>
- </view>
- </view>
- </view>
- <!-- 下月日期格子 -->
- <view class="grid b ac pc {{config.theme}}_next-month-date calendar_date" wx:for="{{calendar.nextMonthGrids}}" wx:key="index" data-idx="{{index}}">
- <view class="date-wrap b cc">
- <view class="date">
- {{item.date}}
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
|