let data =[ {id:"1",text:"广告1"}, {id:"2",text:"广告2"}, ] let list = [] data.forEach((item,index)=>{ list.push({name:item.text,id:item.id}) }); this.bannerList = list