前端过滤查询 HIHIHI 2022-04-29 169 阅读1分钟 var newData = this.Oldtenantlist.filter((item) => { if (item.name.indexOf(e) > -1) { //indexOf方法中如果xxx.indexOf("")返回值为0 return item; } return newData; });