渲染时用了this.$nextTick,页面刷新完再回掉,而我是通过axios异步获取数据的,页面渲染完后,数据才获取到,将map放进一个函数里解决。
this.getRequest("/sta/location").then(resp => {
//this.loading = false;
if (resp) {
//console.log(resp);
console.log("解析数据")
//this.map = this.resp;
this.initChart(resp);
}