this.checkedDataPower = this.checkedDataPower.reduce((preVal, curVal) => {
if (!obj[curVal.dataPowerCode]) {
obj[curVal.dataPowerCode] = true;
preVal.push(curVal);
}
return preVal;
}, []);
数组中的对象根据某个值去重
最新推荐文章于 2024-05-16 23:40:36 发布