将一个普通数组映射为对象数组

this.fileList = this.attachmentList.map(item=>{
      return {id:item.id,name:item.fileName,url:item.filePath}
});

  不能写成:

this.fileList = this.attachmentList.map(item=>{
     id:item.id,name:item.fileName,
     url:item.filePath
});

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
  • 2022-01-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案