<map :latitude="latitude" :longitude="longitude" :markers="covers" @markertap="markertap"></map>
let latitude = ref(39.909)
let longitude = ref(116.39742)
const covers = ref([{
id: 1,
latitude: 39.909,
longitude: 116.39742
}, {
id:2,
latitude: 39.90,
longitude: 116.39
}])
function markertap(e) {
console.log(e);
}

- 发布:2024-02-26 16:15
- 更新:2024-02-26 16:15
- 阅读:158
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: Windows 11 家庭中文版 22H2 22621.3155
HBuilderX类型: 正式
HBuilderX版本号: 3.99
第三方开发者工具版本号: 1.06.2401020
基础库版本号: 3.3.4
项目创建方式: HBuilderX
操作步骤:
预期结果:
在小程序未获取到定位权限时预览到手机上拖动地图会触发markertap,点击marker点会报错[Vue warn]: Invalid prop: type check failed for prop "modelValue". Expected String | Number, got Object
at <WellMap >
在小程序未获取到定位权限时预览到手机上拖动地图会触发markertap,点击marker点会报错[Vue warn]: Invalid prop: type check failed for prop "modelValue". Expected String | Number, got Object
at <WellMap >
实际结果:
在小程序未获取到定位权限时预览到手机上拖动地图会触发markertap,点击marker点会报错[Vue warn]: Invalid prop: type check failed for prop "modelValue". Expected String | Number, got Object
at <WellMap >
在小程序未获取到定位权限时预览到手机上拖动地图会触发markertap,点击marker点会报错[Vue warn]: Invalid prop: type check failed for prop "modelValue". Expected String | Number, got Object
at <WellMap >
bug描述:
开发语言使用的是VUE3
map组件中的@markertap事件在小程序未获取到定位权限时,在电脑的开发者工具上可以正常使用,但是不管是预览还是真机调试 到手机上拖动地图就会触发@markertap,点击marker图标会报错[Vue warn]: Invalid prop: type check failed for prop "modelValue". Expected String | Number, got Object
at <WellMap >
0 个回复