去重loadsh

1:多属性去重 

 

  const iteratee = (item) => {
          return item.productName + '|' + item.varietyName
        }
       const sumMethodListUniqBy = uniqBy(sumcompList.all(), iteratee)
 
 
2:单属性去重

       const sumMethodListUniqBy = uniqBy(sumcompList.all(), ‘xxx’)
posted @ 2024-10-09 17:02  泽泽生龙  阅读(4)  评论(0编辑  收藏  举报