使用前端vue.js实现搜索. 描述: 一般会使用 item in List 的方式来实现遍历渲染数据.如果要实现静态搜索的话 , 需要将搜索框绑定 变量.将 item in List 变为 item in search(word),word为搜索框绑定的参数.如下: search(keyword) { var newList = [] this.list.forEach(item => { if (item.name.indexOf(keyword) != -1) { newList.push(item) } }) return newList