对象数组去重
this.postData = this.postData.filter(function(item, index, self) {
return self.findIndex((el) => el.personId == item.personId) === index
})
普通类型数组去重
let arr=[1,1,2]
arr=Array.from(new Set(arr))
对象数组去重
this.postData = this.postData.filter(function(item, index, self) {
return self.findIndex((el) => el.personId == item.personId) === index
})
普通类型数组去重
let arr=[1,1,2]
arr=Array.from(new Set(arr))