在Vue项目中,使用腾讯地图Javascript API,直接在index.html里面嵌入script标签,
<script charset="utf-8" src="https://map.qq.com/api/gljs?v=1.exp&key=*********></script>
控制台报一个错误:Uncaught TypeError: Cannot read properties of undefined (reading 'split')
at e.receive (gljs?v=1.exp&key=7BQBZ-RZGK7-XL7XK-PMWLW-TVML7-YJB4X&libraries=visualization:40:91430),
报错位置:
if ("<response>" === n.type)
e = this.callbacks[n.id],
n.data && n.data.baseData || delete this.callbacks[n.id],
e && e(n.error || null, n.data, n.time);
else if (void 0 !== n.id && this.parent[n.type])
this.parent[n.type](n.sourceMapId, n.data, r);
else if (void 0 !== n.id && this.parent.getWorkerSource) {
var a = n.type.split(".");
this.parent.getWorkerSource(n.sourceMapId, a[0])[a[1]](n.data, r)
}
}
}
该如何解决?