From f23777d9c67454b95e65b5d2873ea54dcca505bc Mon Sep 17 00:00:00 2001 From: shenyanpei Date: Fri, 12 Nov 2021 09:05:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E5=87=86=E5=8C=96=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E6=97=A5=E5=8E=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/localTool/standCalendar/index.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/pages/localTool/standCalendar/index.vue b/src/pages/localTool/standCalendar/index.vue index bb8c46b5d..5db4d9c99 100644 --- a/src/pages/localTool/standCalendar/index.vue +++ b/src/pages/localTool/standCalendar/index.vue @@ -117,6 +117,9 @@ export default { if (mm<10) { mm = this.padding0(mm, 2) } + if (dd<10) { + dd = this.padding0(dd, 2) + } this.nowDate = yy + '-' + mm + '-' + dd this.formData.year = yy + '年' this.formData.month = mm + '月' @@ -200,8 +203,14 @@ export default { let yy = new Date().getFullYear(); let mm = new Date().getMonth() + 1; let dd = new Date().getDate(); - this.formData.year = yy + '年' + if (mm<10) { + mm = this.padding0(mm, 2) + } this.formData.month = mm + '月' + if (dd<10) { + dd = this.padding0(dd, 2) + } + this.formData.year = yy + '年' this.nowDate = yy + '-' + mm + '-' + dd this.getMonthData() },