diff --git a/src/platforms/h5/view/components/map/map-marker.js b/src/platforms/h5/view/components/map/map-marker.js index 34b27d946d0db945cb6bbf4a54bb867ae4a2f6c1..b2a11f3ec49a5e5ef22d63b0a162c96c67d97627 100644 --- a/src/platforms/h5/view/components/map/map-marker.js +++ b/src/platforms/h5/view/components/map/map-marker.js @@ -274,12 +274,13 @@ export default { callout.setOption(calloutStyle) } else { if (IS_AMAP) { - const callback = (self) => { + const callback = ($event, self) => { if (self.idString) { - self.$parent.$trigger('callouttap', {}, { + self.$parent.$trigger('callouttap', $event, { markerId: Number(self.idString) }) } + $event.stopPropagation() } callout = marker.callout = new maps.Callout(calloutStyle, callback, this) } else { diff --git a/src/platforms/h5/view/components/map/maps/callout.js b/src/platforms/h5/view/components/map/maps/callout.js index e9037b608177eba3a1fdde858aebe3b6f8cfdab1..f0e893f4941cc92ca98bab8267ce9157cbb9f9b9 100644 --- a/src/platforms/h5/view/components/map/maps/callout.js +++ b/src/platforms/h5/view/components/map/maps/callout.js @@ -34,8 +34,8 @@ export function createCallout (maps) { position: option.position }) - maps.event.addListener(this.Text, 'click', () => { - this.callback(this.parent) + maps.event.addListener(this.Text, 'click', ({ originEvent }) => { + this.callback(originEvent, this.parent) }) this.Text.setMap(option.map)