Vue中使用Echart结合百度地图API之如何引入百度地图API
1
之前在使用Echart结合百度地图API是在html中引入的,这次项目中要在vue中使用,发现vue中不能使用script标签引入,也不能使用import导入,在博客上看到使用下面方法加载百度地图的API
const oScript = document.createElement('script');
oScript.type = 'text/javascript';
oScript.src = 'https://api.map.baidu.com/api?v=2.0&ak=你的AK&
原创
2021-10-09 08:56:43 ·
231 阅读 ·
0 评论