const seen = new Set()
const hasDuplicates = this.formNewGood.GoodData.some(function(currentObject) {
return seen.size === seen.add(currentObject.goodsId).size
})
console.log(hasDuplicates)
this.formNewGood.GoodData数组
goodsId检测的数据
网友评论