From 16cfbfec63faa81faad3f72948d744e7d20234fe Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Mon, 18 Nov 2024 11:41:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E7=BB=84=E4=BB=B6=E5=B0=8F=E7=A8=8B=E5=BA=8F=E4=B8=8A?= =?UTF-8?q?=EF=BC=8C=E9=80=89=E6=8B=A9=E4=B8=8D=E5=8C=85=E5=90=AB=E6=97=B6?= =?UTF-8?q?=E5=88=86=E7=A7=92=E6=97=B6=E8=BF=94=E5=9B=9E=E4=BA=86=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84=E6=97=B6=E9=97=B4=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/my-components/my-date-pickerview.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/components/my-components/my-date-pickerview.vue b/components/my-components/my-date-pickerview.vue index 0e1d466..0ea73ad 100644 --- a/components/my-components/my-date-pickerview.vue +++ b/components/my-components/my-date-pickerview.vue @@ -389,9 +389,10 @@ const year = years[arr[0]] const month = arr[1] + 1 const day = arr[2] + 1 - const hour = ('0' + arr[3]).slice(-2) - const min = ('0' + arr[4]).slice(-2) - const sen = ('0' + arr[5]).slice(-2) + const hour = ('0' + (arr[3]||0)).slice(-2) + console.log(hour) + const min = ('0' + (arr[4]||0)).slice(-2) + const sen = ('0' + (arr[5]||0)).slice(-2) if (isObj) { return new Date(year, month, day, hour, min, sen) } @@ -400,6 +401,7 @@ function confirm(e) { + console.log(value.value); const start = returnDateString(value.value) console.log(start); const end = returnDateString(value1.value)