所有数组方法https://www.runoob.com/jsref/jsref-obj-array.html
1.some方法(方法用于检测数组中的元素是否满足指定条件(函数提供))
注意: some() 不会对空数组进行检测。
注意: some() 不会改变原始数组。
this.historyList=[{waybillNo:1585268956},{waybillNo:158526896}]
this.historyList.some((item, i) => {
if (item.waybillNo === waybillNo) {
this.historyList.splice(i, 1);
//在数组的some方法中,如果return true,就会立即终止这个数组的后续循环
return true;
}
});