为原有数组对象添加字段

this.editShipOrderform.items = orderInfo.map(item => {
  item.quantity = ''        //新字段
  item.deliveryWarehouse = ''  //新字段
return item
})

直接通过item.字段名进行添加

猜你喜欢

转载自www.cnblogs.com/wszxx/p/9126206.html