feat: 添加会话列表和搜索功能,重构聊天界面组件

This commit is contained in:
2026-03-09 08:12:30 +07:00
parent 007794688b
commit 212b3fa8de
12 changed files with 640 additions and 3 deletions

View File

@@ -0,0 +1,30 @@
import type { ConversationItem } from "@/features/im/types/conversation";
export const mockConversations: ConversationItem[] = [
{
id: "system",
kind: "system",
title: "系统消息",
preview: "[系统消息]",
timeLabel: "昨天 20:12",
},
{
id: "admin",
kind: "direct",
title: "Admin",
preview: "这是一条聊天消息,很长的聊天消息",
timeLabel: "21分钟前",
avatarUrl:
"https://images.unsplash.com/photo-1613070120286-98b11cdb9f8f?auto=format&fit=crop&w=120&q=80",
unreadCount: 2,
},
{
id: "zhangsan",
kind: "direct",
title: "张三",
preview: "你好呀~~~",
timeLabel: "21分钟前",
avatarUrl:
"https://images.unsplash.com/photo-1524504388940-b1c1722653e1?auto=format&fit=crop&w=120&q=80",
},
];