隐藏历史日期可约状态角标
This commit is contained in:
@@ -261,6 +261,7 @@ Page({
|
||||
|
||||
buildMonthDays() {
|
||||
const summaryMap = this.summaryMap()
|
||||
const todayText = dateUtil.formatDate(new Date())
|
||||
const artistTemplate = this.data.artists.map(artist => ({
|
||||
artistId: artist.id,
|
||||
artistName: artist.name,
|
||||
@@ -274,6 +275,7 @@ Page({
|
||||
const artistCounts = this.normalizeArtistCounts(summary.artistCounts || artistTemplate)
|
||||
return {
|
||||
...day,
|
||||
isPast: day.date < todayText,
|
||||
totalCount: summary.totalCount || 0,
|
||||
dayStatus: summary.dayStatus || 'free',
|
||||
artistCounts,
|
||||
|
||||
@@ -122,8 +122,8 @@
|
||||
<view wx:for="{{monthDays}}" wx:key="date" class="month-cell {{item.isCurrentMonth ? '' : 'out-month'}} {{item.date === currentDateText ? 'selected' : ''}}" data-date="{{item.date}}" bindtap="selectDate">
|
||||
<view class="month-cell-head">
|
||||
<text class="month-day">{{item.day}}</text>
|
||||
<text wx:if="{{item.dayStatus === 'full'}}" class="day-mark full">满</text>
|
||||
<text wx:elif="{{item.dayStatus === 'rest'}}" class="day-mark rest">休</text>
|
||||
<text wx:if="{{!item.isPast && item.dayStatus === 'full'}}" class="day-mark full">满</text>
|
||||
<text wx:elif="{{!item.isPast && item.dayStatus === 'rest'}}" class="day-mark rest">休</text>
|
||||
</view>
|
||||
<view wx:if="{{monthDisplayMode === 'count'}}" class="month-bars">
|
||||
<view wx:for="{{item.artistCounts}}" wx:for-item="count" wx:key="artistId" wx:if="{{count.count > 0}}" class="month-artist-bar" style="background: {{count.color}};">
|
||||
|
||||
Reference in New Issue
Block a user