From a751f972b8b3834cac6a717b7093ed62bd076815 Mon Sep 17 00:00:00 2001 From: Fine Date: Fri, 16 May 2025 17:14:08 +0800 Subject: [PATCH] update --- src/layout/components/NavBar.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layout/components/NavBar.vue b/src/layout/components/NavBar.vue index 2287e878..f3a5d7ac 100644 --- a/src/layout/components/NavBar.vue +++ b/src/layout/components/NavBar.vue @@ -248,8 +248,8 @@ limitations under the License. --> if (!day) { return appStore.setMaxRange([]); } - const gap = dayToMS(day + 1) + hour * 60 * 60 * 1000 + minute * 60 * 1000; - const dates: Date[] = [new Date(new Date().getTime() - gap), new Date()]; + const gap = Math.max(dayToMS(day), hour * 60 * 60 * 1000, minute * 60 * 1000); + const dates: Date[] = [new Date(new Date().getTime() - gap - dayToMS(1)), new Date()]; appStore.setMaxRange(dates); }