

const obj = {};
this.targetList = this.targetList.reduce((array, next) => {
obj[next.code] ? '' : obj[next.code] = true && array.push(next);
return array;
}, []);
console.log(this.targetList);


const obj = {};
this.targetList = this.targetList.reduce((array, next) => {
obj[next.code] ? '' : obj[next.code] = true && array.push(next);
return array;
}, []);
console.log(this.targetList);
555
392

被折叠的 条评论
为什么被折叠?