var self = this;
var arr = this.myCartData.filter((item,index)=>{
let flag = true;
self.selection.forEach((item1,index1)=>{
if(item1.id === item.id){
self.count--;
self.sum = self.sum - item.amount;
flag = false;
}
})
return flag;
})
this.myCartData = arr;
网友评论