提交 1b911176 编写于 作者: X xiaoyucoding

fix: map markettap id

上级 e1620f85
...@@ -14,6 +14,10 @@ import { ...@@ -14,6 +14,10 @@ import {
subscriber subscriber
} from 'uni-mixins' } from 'uni-mixins'
import {
hasOwn
} from 'uni-shared'
var maps var maps
export default { export default {
name: 'Map', name: 'Map',
...@@ -426,7 +430,7 @@ export default { ...@@ -426,7 +430,7 @@ export default {
parent.appendChild(div) parent.appendChild(div)
} }
} }
option.id && this.$trigger('markertap', {}, { hasOwn(option, 'id') && this.$trigger('markertap', {}, {
markerId: option.id markerId: option.id
}) })
}) })
...@@ -521,7 +525,7 @@ export default { ...@@ -521,7 +525,7 @@ export default {
callout = marker.callout = new maps.Callout(calloutStyle) callout = marker.callout = new maps.Callout(calloutStyle)
callout.div.onclick = function ($event) { callout.div.onclick = function ($event) {
option.id && self.$trigger('callouttap', $event, { hasOwn(option, 'id') && self.$trigger('callouttap', $event, {
markerId: option.id markerId: option.id
}) })
$event.stopPropagation() $event.stopPropagation()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册