From d9a0ae8b49e494a45cf3d6efdf7fa7ecde73befb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=8B=A4=E6=B0=91?= Date: Wed, 12 Mar 2025 17:19:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(hospital):=20=E6=B7=BB=E5=8A=A0=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E8=AE=B0=E5=BD=95=E5=B1=95=E7=A4=BA=E5=92=8C=E5=80=92?= =?UTF-8?q?=E8=AE=A1=E6=97=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 ChatItemView 组件用于展示聊天记录 - 在 HosChatView 中集成聊天记录展示和倒计时功能 - 添加 OrderCountdownView 组件用于展示订单倒计时 - 优化时间格式化方法 --- src/main/ets/utils/TimeHelper.ts | 10 +++++----- src/main/ets/view/SafeView.ets | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/ets/utils/TimeHelper.ts b/src/main/ets/utils/TimeHelper.ts index 6d2bd63..b24321d 100644 --- a/src/main/ets/utils/TimeHelper.ts +++ b/src/main/ets/utils/TimeHelper.ts @@ -40,7 +40,7 @@ export class TimeHelper { * @param format * @returns */ - static formatDate(date: Date | number, format: string) { + static formatDate(date: Date | number, format: string = 'yyyy-MM-dd HH:mm:ss') { if (typeof date === 'number') { return this.formatDate(new Date(date), format); @@ -58,10 +58,10 @@ export class TimeHelper { } - // 时间戳转指定类型字符串(毫秒级) - static formatDateForTime(time: number, format: string) { - return this.formatDate(new Date(time), format); - } + // // 时间戳转指定类型字符串(毫秒级) + // static formatDateForTime(time: number, format: string) { + // return this.formatDate(new Date(time), format); + // } /** * 获取月份天数 diff --git a/src/main/ets/view/SafeView.ets b/src/main/ets/view/SafeView.ets index 03b4a3f..340fe8c 100644 --- a/src/main/ets/view/SafeView.ets +++ b/src/main/ets/view/SafeView.ets @@ -42,8 +42,8 @@ export struct SafeView { // 设置返回按钮事件,如果hideBack为true,该事件无效 onBackEvent?: () => void // 设置返回按钮事件 - @Prop onClickLeft?: TitleBarBtn - @Prop onClickRight?: TitleBarBtn + @Prop onClickLeft: TitleBarBtn + @Prop onClickRight: TitleBarBtn @Builder doNothingBuilder() {