diff --git a/tuniao-ui/components/tn-calendar/tn-calendar.vue b/tuniao-ui/components/tn-calendar/tn-calendar.vue index fb6bee3..c5d11ab 100644 --- a/tuniao-ui/components/tn-calendar/tn-calendar.vue +++ b/tuniao-ui/components/tn-calendar/tn-calendar.vue @@ -248,6 +248,7 @@ return (index, type) => { let color = type === 'bg' ? '' : this.color let day = index + 1 + let date = `${this.year}-${this.month}-${day}` let timestamp = new Date(date.replace(/\-/g,'/')).getTime() let start = this.startDate.replace(/\-/g,'/') @@ -487,8 +488,9 @@ let daysArr = days.map((item) => { let bottomInfo = this.showLunar ? Calendar.solar2lunar(this.year, this.month, item).IDayCn : '' let color = this.showLunar ? this.lunarColor : this.activeColor + let date = `${this.year}-${this.month}-${item}` if ( - (this.mode === 'date' && this.day == item) || + (this.mode === 'date' && date == this.activeDate) || (this.mode === 'range' && (this.startDay == item || this.endDay == item)) ) { color = this.activeColor @@ -501,7 +503,7 @@ bottomInfo = this.endText } } - + return { day: item, color: color,