优化最近聊天列表的搜索功能

This commit is contained in:
2026-09-21 11:07:17 +08:00
parent 57dadadd1b
commit b0bb320862
+2 -1
View File
@@ -236,6 +236,7 @@ export default {
contactList: [],
// 当前聊天联系人
currentContact: null,
// 最近聊天列表
recentChats: [],
// 聊天消息
contactMessages: {},
@@ -258,7 +259,7 @@ export default {
const keyword = this.searchText.trim().toLowerCase();
return this.recentChats.filter((contact) =>
contact.name.toLowerCase().includes(keyword),
contact.contactName.toLowerCase().includes(keyword),
);
},