当前位置:网站首页>JS to add an attribute to an array object

JS to add an attribute to an array object

2022-06-11 23:11:00 And white

this.data.forEach((item,index)=>{
    
   needData.push(
       Object.assign({
    },item,
           {
    'addAttr':'addAttrContent'})
   )
})
原网站

版权声明
本文为[And white]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203011621534036.html