let arr = this.getCartData let arr1 = this.choselist arr = arr.filter(item => { let list = arr1.map(v => v.id) return !list.includes(item.id) }) this.getCartData = arr console.log(this.getCartData)
删选两个数组相同元素或相同属性
原文:https://www.cnblogs.com/lwming/p/11708565.html