优化最近聊天列表的搜索功能
This commit is contained in:
@@ -236,6 +236,7 @@ export default {
|
|||||||
contactList: [],
|
contactList: [],
|
||||||
// 当前聊天联系人
|
// 当前聊天联系人
|
||||||
currentContact: null,
|
currentContact: null,
|
||||||
|
// 最近聊天列表
|
||||||
recentChats: [],
|
recentChats: [],
|
||||||
// 聊天消息
|
// 聊天消息
|
||||||
contactMessages: {},
|
contactMessages: {},
|
||||||
@@ -258,7 +259,7 @@ export default {
|
|||||||
const keyword = this.searchText.trim().toLowerCase();
|
const keyword = this.searchText.trim().toLowerCase();
|
||||||
|
|
||||||
return this.recentChats.filter((contact) =>
|
return this.recentChats.filter((contact) =>
|
||||||
contact.name.toLowerCase().includes(keyword),
|
contact.contactName.toLowerCase().includes(keyword),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user