优化最近聊天列表的搜索功能
This commit is contained in:
@@ -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),
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user