this.dataListSelections.forEach(item => {
let prodIndex = prods.findIndex((prod) => prod.prodId === item.prodId)
forEach配合findIndex 实现 如果满足条件添加数组,如果数组存在则不添加
最新推荐文章于 2023-04-25 17:46:59 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
this.dataListSelections.forEach(item => {
let prodIndex = prods.findIndex((prod) => prod.prodId === item.prodId)