From bc76c6e591da8565622740bab2470c3758ca4d2d Mon Sep 17 00:00:00 2001 From: icssoa <615206459@qq.com> Date: Thu, 25 Sep 2025 21:20:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20cl-select-date=20=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=9C=A8=E8=8C=83=E5=9B=B4=E9=80=89=E6=8B=A9=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E4=B8=8B=E9=A6=96=E6=AC=A1=E6=B8=B2=E6=9F=93=E6=97=B6?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E6=9C=AA=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cool-ui/components/cl-select-date/cl-select-date.uvue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/uni_modules/cool-ui/components/cl-select-date/cl-select-date.uvue b/uni_modules/cool-ui/components/cl-select-date/cl-select-date.uvue index 33b03b3..975bb79 100644 --- a/uni_modules/cool-ui/components/cl-select-date/cl-select-date.uvue +++ b/uni_modules/cool-ui/components/cl-select-date/cl-select-date.uvue @@ -644,11 +644,10 @@ async function onChange(data: number[]) { // 设置value function setValue(val: string) { - text.value = ""; - // 如果值为空,使用当前时间 if (isNull(val) || isEmpty(val)) { value.value = checkDate(dayUts().toArray()); + text.value = ""; } else { // 否则解析为数组 value.value = checkDate(dayUts(val).toArray()); @@ -660,8 +659,10 @@ function setValue(val: string) { function setValues(val: string[]) { if (isEmpty(val)) { values.value = ["", ""]; + text.value = ""; } else { values.value = val; + updateText(); } }