Skip to content

Commit

Permalink
upd: update feature of holiday
Browse files Browse the repository at this point in the history
  • Loading branch information
todrfu committed Oct 15, 2020
1 parent 06b8255 commit e689811
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
6 changes: 2 additions & 4 deletions docs/v2/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,13 @@ Page({
* currentSelect 当前点击的日期
*/
takeoverTap(e) {
console.log('takeoverTap', e.detail) // => { year: 2019, month: 12, day: 3, ...}
console.log('takeoverTap', e.detail) // => { year: 2019, month: 12, date: 3, ...}
},
/**
* 选择日期后执行的事件
* currentSelect 当前点击的日期
* allSelectedDays 选择的所有日期(当multi为true时,allSelectedDays有值)
*/
afterTapDate(e) {
console.log('afterTapDate', e.detail) // => { currentSelect: {}, allSelectedDays: [] }
console.log('afterTapDate', e.detail) // => { year: 2019, month: 12, date: 3, ...}
},
/**
* 当日历滑动时触发(适用于周/月视图)
Expand Down
10 changes: 2 additions & 8 deletions src/component/v2/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,9 @@
<view class="date b ac pc {{item.class ? item.class : ''}} {{item.isToday && config.highlightToday ? config.theme + '_today' : ''}} {{item.choosed ? config.theme + '_choosed' : ''}} {{item.disable ? config.theme + '_date-disable' : ''}} {{config.chooseAreaMode ? 'date-area-mode' : ''}}">
{{config.markToday && item.isToday ? config.markToday : item.date}}
<view
wx:if="{{(config.showLunar && item.lunar && !item.showTodoLabel) || (item.showTodoLabel && calendar.todoLabelPos !== 'bottom')}}"
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' : ''}}">
{{item.lunar.Term || item.lunar.IDayCn}}
</view>
<view
wx:if="{{config.showHolidays && item.label && !item.choosed}}"
class="date-desc {{config.theme + '_date-desc-lunar'}} date-desc-bottom"
style="background-color: {{item.label ? '' : item.color}}; color: {{item.color}}">
{{item.label}}
<text class="{{config.showHolidays && !item.showTodoLabel && item.label && !item.choosed ? config.theme + '_date-desc-lunar' : ''}}">{{item.label || item.lunar.Term || item.lunar.IDayCn}}</text>
</view>
<view
wx:if="{{item.showTodoLabel && !calendar.todoLabelCircle}}"
Expand Down

0 comments on commit e689811

Please sign in to comment.