[Vue warn]: Error in created hook: “TypeError: Cannot read properties of undefined (reading ‘map’)”
但是地图加载用的bmap 定位不到错误的位置
<ve-bmap :settings ="chartSettings"
:title="title"
:tooltip="{}"
:series="chartSeries"
height="100%" >
</ve-bmap>
const convertData = function (data) {
const res = []
if (!data) {
return
}
data.forEach(item => {
const { name, value } = item
const coord = geoCoordMap[name]
res.push({
name,
value: […coord, value]
})
})
return res
}
export default {
/* eslint-disable quote-props */
data () {
return {
title: {
text: ‘销售大盘’,
subtext: ‘销售趋势统计’,
sublink:‘https://www.imooc.com’,
left: ‘center’
},
chartSettings :{
key:‘goPs6mg0jXo01NUbfq88fzhPk8LmjKMq’,
bmap: {
center:[104.114129, 37.550339],
zoom:5,
roam:false,
mapStyle: {
}
}
}
感觉和之前的页面路径错乱了