2***@qq.com
2***@qq.com
  • 发布:2023-06-03 11:28
  • 更新:2023-09-15 14:36
  • 阅读:449

uniapp vue3 使用map组件 iconPath引入的图标在电脑 手机上都不显示 换成vue2就没有问题了 这是什么问题 求解

分类:uni-app

setup() {
let longitude = ref(113.941112)
let latitude = ref(22.52459)
let markers = reactive([])
let mapIcon = ref(https://s1.imagehub.cc/images/2023/06/03/icon_positioning_g.png)
function initMap(){
let marker = reactive([]);
marker.push({
id: 1,
width: 50,
height: 50,
longitude:longitude.value,
latitude: latitude.value,
zIndex: 100,
iconPath:mapIcon.value
});
markers = marker
console.log(markers,'markers')
}
return {
longitude,
latitude,
markers,
initMap,

        }  
        onLoad(() => {  
            initMap();  

        })  

    }  

vue3写法 图标不显示

2023-06-03 11:28 负责人:无 分享
已邀请:

要回复问题请先登录注册