|
@@ -879,11 +879,11 @@ const addFriendSearching = ref(false);
|
|
|
|
|
|
|
|
// 过滤后的好友列表
|
|
// 过滤后的好友列表
|
|
|
const filteredShareFriendList = computed(() => {
|
|
const filteredShareFriendList = computed(() => {
|
|
|
- if (!shareSearch.value) {
|
|
|
|
|
|
|
+ if (shareSearch.value == null || shareSearch.value === "") {
|
|
|
return shareFriendList.value;
|
|
return shareFriendList.value;
|
|
|
}
|
|
}
|
|
|
- const keyword = shareSearch.value.toLowerCase();
|
|
|
|
|
- return shareFriendList.value.filter(friend => friend.name.toLowerCase().includes(keyword));
|
|
|
|
|
|
|
+ const keyword = String(shareSearch.value).toLowerCase();
|
|
|
|
|
+ return shareFriendList.value.filter(friend => (friend.name ?? "").toLowerCase().includes(keyword));
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
// 用户信息
|
|
// 用户信息
|
|
@@ -911,12 +911,12 @@ const relationDialogTitle = computed(() => {
|
|
|
|
|
|
|
|
// 过滤后的关系列表
|
|
// 过滤后的关系列表
|
|
|
const filteredRelationList = computed(() => {
|
|
const filteredRelationList = computed(() => {
|
|
|
- if (!relationSearch.value) {
|
|
|
|
|
|
|
+ if (relationSearch.value == null || relationSearch.value === "") {
|
|
|
return relationList.value;
|
|
return relationList.value;
|
|
|
}
|
|
}
|
|
|
- const keyword = relationSearch.value.toLowerCase();
|
|
|
|
|
|
|
+ const keyword = String(relationSearch.value).toLowerCase();
|
|
|
return relationList.value.filter(
|
|
return relationList.value.filter(
|
|
|
- user => user.name.toLowerCase().includes(keyword) || user.description.toLowerCase().includes(keyword)
|
|
|
|
|
|
|
+ user => (user.name ?? "").toLowerCase().includes(keyword) || (user.description ?? "").toLowerCase().includes(keyword)
|
|
|
);
|
|
);
|
|
|
});
|
|
});
|
|
|
|
|
|