|
@@ -34,6 +34,10 @@ Component({
|
|
|
type: Number,
|
|
|
value: new Date().getMonth() + 1,
|
|
|
},
|
|
|
+ nowYear: {
|
|
|
+ type: Number,
|
|
|
+ value: new Date().getFullYear(),
|
|
|
+ },
|
|
|
nowMonth: {
|
|
|
type: Number,
|
|
|
value: new Date().getMonth() + 1,
|
|
@@ -106,6 +110,7 @@ Component({
|
|
|
/** 获取当月日期 */
|
|
|
getNowMonthDays(year, month) {
|
|
|
let {
|
|
|
+ nowYear,
|
|
|
nowMonth,
|
|
|
nowDay,
|
|
|
} = this.data
|
|
@@ -132,7 +137,7 @@ Component({
|
|
|
time,
|
|
|
color: -1,
|
|
|
day: newdate,
|
|
|
- isNowMonthDay: (month == nowMonth && i == nowDay) ? "isNowMonthDay" : ""
|
|
|
+ isNowMonthDay: (year == nowYear && month == nowMonth && i == nowDay) ? "isNowMonthDay" : ""
|
|
|
});
|
|
|
}
|
|
|
// this.data.use_date_arr.forEach(el => {
|