vue baidumap background myLabel使用本地图片
程序员文章站
2022-06-01 21:45:15
...
找了半天原因发现应该是分号层级不对
myLabel.setStyle({
cursor: "pointer",
background: 'url("'+$_this.pointUrl1+'/map-pointer-e1.png")',
});
或者
myLabel.setStyle({
cursor: "pointer",
background: 'url('+require("@/assets/image/map-pointer-e2.png")+')',
});