From ec20251b12170d70751f705701f4e8c336808950 Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期四, 15 一月 2026 13:09:45 +0800
Subject: [PATCH] 1.甘特图带分页实现示例
---
src/utils/global.js | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/utils/global.js b/src/utils/global.js
index b121552..19b4ea7 100644
--- a/src/utils/global.js
+++ b/src/utils/global.js
@@ -41,6 +41,16 @@
return data.getFullYear() + '-' + month + '-' + date
}
+// 鏃堕棿澶勭悊鍑芥暟 骞存湀鏃� 寰�鍓嶆帹涓�澶�
+export function handleDateReduceOneDay(value) {
+ const newDate = new Date(value)
+ newDate.setDate(newDate.getDate() - 1)
+ const data = new Date(newDate)
+ const month = data.getMonth() < 9 ? '0' + (data.getMonth() + 1) : data.getMonth() + 1
+ const date = data.getDate() <= 9 ? '0' + data.getDate() : data.getDate()
+ return data.getFullYear() + '-' + month + '-' + date
+}
+
// 浜嬩欢澶勭悊鍑芥暟 鏃跺垎绉�
// 鑾峰彇褰撳墠鏃堕棿
export function handleDatetime2(value) {
--
Gitblit v1.9.3