对象数组去重 罗杰斯 2022-03-07 145 阅读1分钟 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))