提交 bad593bb 编写于 作者: DCloud-WZF's avatar DCloud-WZF 💬

fix(map): 修复google地图h5移动端callout点击触发map点击问题

上级 83399976
......@@ -3,7 +3,7 @@ import { isFunction } from '@vue/shared'
import { getRealPath } from '@dcloudio/uni-platform'
import { defineSystemComponent, useCustomEvent } from '@dcloudio/uni-components'
import { Maps, Map, LatLng, Callout, CalloutOptions } from './maps'
import { getIsAMap } from '../../../helpers/location'
import { MapType, getMapInfo, getIsAMap } from '../../../helpers/location'
import {
LatLng as GLatLng,
Marker as GMarker,
......@@ -358,6 +358,16 @@ export default /*#__PURE__*/ defineSystemComponent({
$event.stopPropagation()
$event.preventDefault()
}
// The mobile terminal prevent google map callout click trigger map click
if(getMapInfo().type === MapType.GOOGLE){
callout.div!.ontouchstart = function($event: Event) {
$event.stopPropagation();
}
callout.div!.onpointerdown = function ($event: Event) {
$event.stopPropagation()
}
}
}
}
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册