修改设置日期函数

This commit is contained in:
GGJ
2024-12-02 13:33:44 +08:00
parent 6a57c4a573
commit 834fc6895a
16 changed files with 179 additions and 237 deletions

View File

@@ -480,7 +480,7 @@ const NowgetEndTime = () => {
const setTimeOptions = (list: any) => {
timeOptions.value = list
}
const setInterval = (value: any) => {
const setTheDate = (value: any) => {
interval.value = value
timeChange(value)
}
@@ -510,6 +510,7 @@ function getMonthOnMonth(startDate: string, endDate: string): [string, string] {
return [formatDate(startMonthAgo), formatDate(endMonthAgo)]
}
// 格式化日期为 YYYY-MM-DD
function formatDate(date: Date): string {
const year = date.getFullYear()