多创建一个副本数组bbb接收后台返回的表格数据
data() {
return {
ccc:[],
bbb:[],
}
this.bbb = arr;
this.ccc = arr;
每次过滤用bbb过滤,再将结果返回给ccc
searchJT() {
this.is_search = true;
//当搜索框为空时,显示全部信息
if(this.select_word === ""){
console.log(11);
this.ccc = this.bbb.filter((value) => {
return value;
})
}else{
console.log(22);
this.ccc = this.bbb.filter((value) => {
if (value.Info.indexOf(this.select_word) > -1){
return value;
}
})
}
// })
},