feat(chat): 添加聊天图片预览功能并优化消息展示

- 新增 ChatItemImageView 组件用于显示聊天中的图片消息
- 添加 ImagePreviewView 组件实现图片预览功能
- 优化聊天项 ChatItemView 的布局和时间显示逻辑
- 在 HosChatView 中集成图片预览功能
-调整 HosConversationVIew 的刷新逻辑
- 优化 MessageHelper 中的消息解析和时间显示相关方法
这个提交包含在:
徐勤民 2025-03-13 16:58:07 +08:00
父节点 dcb822cc31
当前提交 8196f908fe

查看文件

@ -72,4 +72,24 @@ export class TimeHelper {
static getMonthDays(year: number, month: number) {
return new Date(year, month, 0).getDate()
}
/**
*
* @param date1
* @param date2
* @returns
*/
static isSameDay(date1: Date | number, date2?: Date | number) {
if (typeof date1 === 'number') {
date1 = new Date(date1);
}
if (!date2) {
date2 = new Date();
} else if (typeof date2 === 'number') {
date2 = new Date(date2);
}
return date1.getFullYear() === date2.getFullYear() &&
date1.getMonth() === date2.getMonth() &&
date1.getDate() === date2.getDate();
}
}