perf: 优化日历

This commit is contained in:
kuaifan 2025-04-12 19:45:06 +08:00
parent 6927c0b30b
commit 7d1979f067

View File

@ -368,9 +368,9 @@ export default {
const startYear = start.getFullYear();
const endYear = end.getFullYear();
if (startYear !== endYear) {
this.rangeText = $A.dayjs(date).format("YYYY.MM.DD") + " ~ " + $A.dayjs(end).format("YYYY.MM.DD");
this.rangeText = $A.dayjs(start).format("YYYY.MM.DD") + " ~ " + $A.dayjs(end).format("YYYY.MM.DD");
} else {
this.rangeText = $A.dayjs(date).format("YYYY.MM.DD") + " ~ " + $A.dayjs(end).format("MM.DD");
this.rangeText = $A.dayjs(start).format("YYYY.MM.DD") + " ~ " + $A.dayjs(end).format("MM.DD");
}
break;
}