1. 根据指定属性删除对象

_/根据属性删除指定对象/
_removeByValue(arr, attr, value) {
var index=0;
for(var i in arr){
if(arr[i][attr]==value){index=i;break;
}
}
arr.splice(index,1);
},

let fileList = [{url:’yyou.pdf’,id:1},{url:’ouuu.pdf’,id:2}];
this.removeByValue(this.fileList,’url’,’ouuu.pdf’) ;//删除fileList中url为’ouuu.pdf’的对象

2. 清空对象属性值

let queryParams = {
name:’you’,
tax:’2323232Xsssds222’
}
for(let key in this.queryParams){
this.queryParams[key] = ‘’
}