当你想为代码中的数组对象去重时:请直接复制下面代码 let hasObj = {}; {你的数组对象} = {你的数组对象}.reduce((cur, next) => { // next.id (此为你对象数组中的判定相同属性) hasObj[next.id] ? "" : (hasObj[next.id] = true && cur.push(next)); return cur; }, []); OK复制上面代码直接搞定!拿走不谢!