From 456b85724932c4528f6aa309fadb74bce32aac34 Mon Sep 17 00:00:00 2001 From: icssoa <615206459@qq.com> Date: Thu, 11 Sep 2025 11:20:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BB=84=E4=BB=B6=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cool/utils/parse.ts | 5 +-- pages/demo/form/select.uvue | 3 +- .../cl-calendar-select.uvue | 26 ++++-------- .../components/cl-cascader/cl-cascader.uvue | 36 ++++++++-------- .../cl-select-date/cl-select-date.uvue | 27 ++++-------- .../cl-select-time/cl-select-time.uvue | 26 ++++-------- .../components/cl-select/cl-select.uvue | 41 +++++++------------ .../cool-ui/components/cl-select/props.ts | 4 +- uni_modules/cool-ui/index.d.ts | 2 +- uni_modules/cool-ui/types/index.ts | 2 + 10 files changed, 68 insertions(+), 104 deletions(-) diff --git a/cool/utils/parse.ts b/cool/utils/parse.ts index 74e14f6..f3c4dec 100644 --- a/cool/utils/parse.ts +++ b/cool/utils/parse.ts @@ -1,4 +1,3 @@ -import { ref, type Ref } from "vue"; import { forEach, forInObject, isArray, isObject, isString } from "./comm"; /** @@ -112,11 +111,11 @@ export const parseClass = (data: any): string => { */ export function parseToObject(data: T): UTSJSONObject { // #ifdef APP-ANDROID - return JSON.parseObject(JSON.stringify(data)!)!; + return JSON.parseObject(JSON.stringify(data ?? {})!)!; // #endif // #ifndef APP-ANDROID - return JSON.parse(JSON.stringify(data)) as UTSJSONObject; + return JSON.parse(JSON.stringify(data || {})) as UTSJSONObject; // #endif } diff --git a/pages/demo/form/select.uvue b/pages/demo/form/select.uvue index a23b9a7..78f1a7d 100644 --- a/pages/demo/form/select.uvue +++ b/pages/demo/form/select.uvue @@ -52,8 +52,7 @@ diff --git a/uni_modules/cool-ui/components/cl-calendar-select/cl-calendar-select.uvue b/uni_modules/cool-ui/components/cl-calendar-select/cl-calendar-select.uvue index 1056965..ca5dfc6 100644 --- a/uni_modules/cool-ui/components/cl-calendar-select/cl-calendar-select.uvue +++ b/uni_modules/cool-ui/components/cl-calendar-select/cl-calendar-select.uvue @@ -1,10 +1,7 @@