From c5708b269adc3cd728562ee599c1bb9a80f48137 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Wed, 5 Mar 2025 14:28:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6):=20?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=B8=83=E5=B1=80-=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=AD=9B=E9=80=89=E7=BB=84=E4=BB=B6=20#12396?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/custom-component/v-query/Time.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/core-frontend/src/custom-component/v-query/Time.vue b/core/core-frontend/src/custom-component/v-query/Time.vue index fde6d4e20f..2ee9baf4df 100644 --- a/core/core-frontend/src/custom-component/v-query/Time.vue +++ b/core/core-frontend/src/custom-component/v-query/Time.vue @@ -388,21 +388,23 @@ const selectSecond = ref(false) const setArrValue = () => { currentDate.value = currentDate.value.slice(0, getIndex() + 1) + const timeFormat = + currentDate.value.length === 2 ? currentDate.value.concat(['01']) : currentDate.value if (isRange.value) { const [start, end] = selectValue.value || [] if (selectSecond.value) { selectValue.value = [ - start ? start : new Date(`${currentDate.value.join('/')} ${currentTime.value.join(':')}`), - new Date(`${currentDate.value.join('/')} ${currentTime.value.join(':')}`) + start ? start : new Date(`${timeFormat.join('/')} ${currentTime.value.join(':')}`), + new Date(`${timeFormat.join('/')} ${currentTime.value.join(':')}`) ] } else { selectValue.value = [ - new Date(`${currentDate.value.join('/')} ${currentTime.value.join(':')}`), - end ? end : new Date(`${currentDate.value.join('/')} ${currentTime.value.join(':')}`) + new Date(`${timeFormat.join('/')} ${currentTime.value.join(':')}`), + end ? end : new Date(`${timeFormat.join('/')} ${currentTime.value.join(':')}`) ] } } else { - selectValue.value = new Date(`${currentDate.value.join('/')} ${currentTime.value.join(':')}`) + selectValue.value = new Date(`${timeFormat.join('/')} ${currentTime.value.join(':')}`) } }