提交 ae6ea342 编写于 作者: D DCloud_LXH

fix(mp-weixin): 修复小程序插件 $emit 不触发

上级 4157c493
......@@ -794,11 +794,6 @@ const customize = cached((str) => {
});
function initTriggerEvent (mpInstance) {
{
if (!wx.canIUse || !wx.canIUse('nextTick')) {
return
}
}
const oldTriggerEvent = mpInstance.triggerEvent;
mpInstance.triggerEvent = function (event, ...args) {
return oldTriggerEvent.apply(mpInstance, [customize(event), ...args])
......
......@@ -13,11 +13,6 @@ const customize = cached((str) => {
})
function initTriggerEvent (mpInstance) {
if (__PLATFORM__ === 'mp-weixin' || __PLATFORM__ === 'app-plus') {
if (!wx.canIUse || !wx.canIUse('nextTick')) {
return
}
}
const oldTriggerEvent = mpInstance.triggerEvent
mpInstance.triggerEvent = function (event, ...args) {
return oldTriggerEvent.apply(mpInstance, [customize(event), ...args])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册