提交 8712c871 编写于 作者: Q qiang

fix: 修复部分小程序平台 map 组件事件中无法正确获取 markerId 的问题

上级 6f4602aa
......@@ -291,6 +291,10 @@ function wrapper (event) {
event.detail = {}
}
if (!('markerId' in event.detail) && 'markerId' in event) {
event.detail.markerId = event.markerId
}
if (__PLATFORM__ === 'mp-baidu') { // mp-baidu,checked=>value
if (
isPlainObject(event.detail) &&
......
import {
isFn,
cached,
camelize
camelize,
hasOwn
} from 'uni-shared'
import {
......@@ -58,6 +59,12 @@ export function initSpecialMethods (mpInstance) {
specialMethods.forEach(method => {
if (isFn(mpInstance.$vm[method])) {
mpInstance[method] = function (event) {
if (!hasOwn(event, 'detail')) {
event.detail = {}
}
if (!('markerId' in event.detail) && 'markerId' in event) {
event.detail.markerId = event.markerId
}
// TODO normalizeEvent
mpInstance.$vm[method](event)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册