Files

46 lines
2.6 KiB
Plaintext
Raw Permalink Normal View History

2020-11-17 18:52:15 +08:00
<template name="calendar">
<view class="flex box box-tb box-align-center">
<view class="calendar pink-color box box-tb">
<view class="top-handle fs28 box box-lr box-align-center box-pack-center">
<!-- <view class="prev box box-rl" bindtap="choosePrevMonth" data-handle="prev">
<view class="prev-handle box box-lr box-align-center box-pack-center">《</view>
</view> -->
<view class="date-area box box-lr box-align-center box-pack-center">{{curYear || "--"}} 年 {{curMonth || "--"}} 月</view>
<!-- <view class="next box box-lr" bindtap="chooseNextMonth" data-handle="next">
<view class="next-handle box box-lr box-align-center box-pack-center">》</view>
</view> -->
</view>
<view class="weeks box box-lr box-align-center">
<view class="week fs28" wx:for="{{weeksCh}}" wx:key="{{index}}" data-idx="{{index}}">{{item}}</view>
</view>
<view class="perspective">
<view class="days box box-lr box-wrap {{leftSwipe ? 'leftRoate' : ''}} {{rightSwipe ? 'rightRoate' : ''}}">
<view wx:if="{{empytGrids}}" class="grid disable-day-color box box-align-center box-pack-center"
wx:for="{{empytGrids}}"
wx:key="{{index}}"
data-idx="{{index}}">
<view class="day box box-align-center box-pack-center">{{item}}</view>
</view>
<view class="grid normal-day-color box box-align-center box-pack-center"
wx:for="{{days}}"
wx:key="{{index}}"
data-disable="{{item.disable}}"
data-idx="{{index}}"
bindtap="tapDayItem">
<view class="day-with-dot box box-tb box-align-center box-pack-center">
<view wx:if="{{item.showTodoLabel && todoLabelPos === 'top'}}" class="{{item.todoText ? 'todo-text' : 'todo-dot'}}" style="background-color: {{todoLabelColor}}">{{item.todoText}}</view>
<view class="day border-radius {{item.choosed ? 'day-choosed-color pink-bg' : ''}} {{ item.disable ? 'disable-day-color disable-day-circle' : '' }} box box-align-center box-pack-center">{{item.day}}</view>
<view wx:if="{{item.showTodoLabel && todoLabelPos === 'bottom'}}" class="{{item.todoText ? 'todo-text' : 'todo-dot'}}" style="background-color: {{todoLabelColor}}">{{item.todoText}}</view>
</view>
</view>
<view class="grid disable-day-color box box-align-center box-pack-center"
wx:for="{{lastEmptyGrids}}"
wx:key="{{index}}"
data-idx="{{index}}">
<view class="day box box-align-center box-pack-center">{{item}}</view>
</view>
</view>
</view>
</view>
</view>
</template>