SearchUserTable() { var SearchUserText = RoleManage.SearchUserText.trim(); if (SearchUserText.trim() == "") { RoleManage.tableUserData = RoleManage.tableUserAllData }//RoleManage.tableUserAllData存储着显示的所有数据 else { RoleManage.tableUserData = RoleManage.tableUserAllData.filter(e => { if (e.UserAccount.toUpperCase().indexOf(SearchUserText.toUpperCase()) >= 0) { return true; } });//filter是一个方法,indexof实现查找 } },