diff --git a/src/uni_modules/wot-design-uni/components/common/dayjs.ts b/src/uni_modules/wot-design-uni/components/common/dayjs.ts index 7252c018..bc3277ad 100644 --- a/src/uni_modules/wot-design-uni/components/common/dayjs.ts +++ b/src/uni_modules/wot-design-uni/components/common/dayjs.ts @@ -1,3 +1,5 @@ +import { isDate } from './util' + /* eslint-disable */ class Dayjs { utc: boolean @@ -28,7 +30,7 @@ class Dayjs { parseConfig(dateStr?:string | number | Date) { if (!dateStr) return new Date() - if (dateStr instanceof Date) return dateStr + if (isDate(dateStr)) return dateStr if (/^(\d){8}$/.test(dateStr as string)) { this.utc = true return `${(dateStr as string).substr(0, 4)}-${(dateStr as string).substr(4, 2)}-${(dateStr as string).substr(6, 2)}` diff --git a/src/uni_modules/wot-design-uni/components/common/util.ts b/src/uni_modules/wot-design-uni/components/common/util.ts index 55c336d4..8feace3b 100644 --- a/src/uni_modules/wot-design-uni/components/common/util.ts +++ b/src/uni_modules/wot-design-uni/components/common/util.ts @@ -439,7 +439,7 @@ export function deepClone(obj: T, cache: Map = new Map()): T { } // 处理特殊对象类型:日期、正则表达式、错误对象 - if (obj instanceof Date) { + if (isDate(obj)) { return new Date(obj.getTime()) as any } if (obj instanceof RegExp) { diff --git a/src/uni_modules/wot-design-uni/components/wd-action-sheet/wd-action-sheet.vue b/src/uni_modules/wot-design-uni/components/wd-action-sheet/wd-action-sheet.vue index 0164c34b..ef4268ac 100644 --- a/src/uni_modules/wot-design-uni/components/wd-action-sheet/wd-action-sheet.vue +++ b/src/uni_modules/wot-design-uni/components/wd-action-sheet/wd-action-sheet.vue @@ -73,6 +73,7 @@ export default {