fix(系统设置): 添加成员时不能按照ID搜索

--bug=1018544 --user=李玉号 【系统设置】工作空间-成员-添加成员时不能按照ID搜索成员
https://www.tapd.cn/55049933/s/1269732
This commit is contained in:
shiziyuan9527 2022-10-20 15:50:02 +08:00 committed by lyh
parent 624e64a398
commit f0f1b5790a
1 changed files with 4 additions and 1 deletions

View File

@ -176,7 +176,10 @@ export default {
this.handleUserOption(queryString ? this.userListCopy.filter(this.createFilter(queryString)) : this.userListCopy); this.handleUserOption(queryString ? this.userListCopy.filter(this.createFilter(queryString)) : this.userListCopy);
}, },
createFilter(queryString) { createFilter(queryString) {
return item => (item.name.toLowerCase().indexOf(queryString.toLowerCase()) !== -1); return item => {
return (item.id.toLowerCase().indexOf(queryString.toLowerCase()) !== -1
|| (item.name && item.name.toLowerCase().indexOf(queryString.toLowerCase()) !== -1));
};
}, },
resetUserOption(val) { resetUserOption(val) {
if (val) { if (val) {