1.async/await是基于Promise的,是进一步的一种优化,await会等待异步执行完成

                getProjectTask(id){
this.axios.get('/api/v1/task/' + id).then(resp=>{
this.allTasks.push(resp.data.data);
})
},
getAllTask(){
this.projectIds.forEach(id=>{
(async()=>{await this.getProjectTask(id)})();
})
}
04-14 00:14