js前端过滤
if(this.formdata){
console.log(this.formdata);
var ss= this.warnwrapcopy.filter((item)=>{ //过滤数组元素
// return item.includes(this.formdata); //如果包含字符返回true
console.log(item);
if(item.type.indexOf(this.formdata)!=-1 || item.address.indexOf(this.formdata)!=-1 || item.time.indexOf(this.formdata)!=-1){
return item;
console.log(item,'12222');
}
});
console.log(ss);
this.warnwrap=ss;
}else{
//this.loadsb();
}