JS 的forEach、map和async函数

今天需要在成图前从数据库依次获取各点的数据,结果发现直接用数组的forEach和map都无效。 代码如下: //服务器异步方法总是最后? configEchart=async()=>{ const {stations} = this.state let options = [] await stations.map(async(item,index)=>
相关文章
相关标签/搜索