//arr为总数据,
//attr为要删除的字段
//value为要删除的值
removeByValue(arr, attr, value) {
let index = 0;
let flag = false;
for (let i in arr) {
if (arr[i][attr] === value) {
index = i;
flag = true
break;
} else {
flag = false
}
}
if (flag) {
arr.splice(index, 1);
}
},