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

fix(map): 修复tap事件不触发及优化markertap返回经纬度信息

上级 a67eb1c0
...@@ -200,6 +200,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({ ...@@ -200,6 +200,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({
map.hide() map.hide()
} }
map.onclick = (e) => { map.onclick = (e) => {
trigger('tap', {} as Event, e)
trigger('click', {} as Event, e) trigger('click', {} as Event, e)
} }
map.onstatuschanged = (e) => { map.onstatuschanged = (e) => {
...@@ -399,6 +400,8 @@ function useMapMethods(props: Props, trigger: CustomEventTrigger) { ...@@ -399,6 +400,8 @@ function useMapMethods(props: Props, trigger: CustomEventTrigger) {
nativeMarker.onclick = (e) => { nativeMarker.onclick = (e) => {
trigger('markertap', {} as Event, { trigger('markertap', {} as Event, {
markerId: id, markerId: id,
latitude,
longitude,
}) })
} }
if (nativeBubble) { if (nativeBubble) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册