From 63e77eb3cbe501b3f14dba1fa87618ce1f9570eb Mon Sep 17 00:00:00 2001 From: juzi <819872918@qq.com> Date: Tue, 6 Feb 2024 16:13:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A9=BE=E9=A9=B6=E8=88=B1?= =?UTF-8?q?=E8=83=BD=E6=BA=90=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/databoard/components/GasChart.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/views/databoard/components/GasChart.vue b/src/views/databoard/components/GasChart.vue index a808d48b..9daab55c 100644 --- a/src/views/databoard/components/GasChart.vue +++ b/src/views/databoard/components/GasChart.vue @@ -246,9 +246,7 @@ export default { .map((_, index) => { const today = new Date(); const dtimestamp = today - (index+1) * 24 * 60 * 60 * 1000; - return `${currentMonth < 10?'0'+currentMonth:currentMonth }.${new Date( - dtimestamp - ).getDate()}`;}).reverse() + return `${new Date(dtimestamp).getMonth()+1}.${new Date(dtimestamp).getDate()}`;}).reverse() }else if (this.chartTime == "月") { if (currentMonth in [1, 3, 5, 7, 8, 10, 12]) { days = 31;