diff --git a/packages/uni-app-plus/dist/index.js b/packages/uni-app-plus/dist/index.js index 46c3bf3d49baf1b86c144055441c539dc1680d19..672330eed81d0cb362a7e40063385c9b21b3616f 100644 --- a/packages/uni-app-plus/dist/index.js +++ b/packages/uni-app-plus/dist/index.js @@ -271,6 +271,11 @@ const customize = cached((str) => { }); function initTriggerEvent (mpInstance) { + { + if (!wx.canIUse('nextTick')) { + return + } + } const oldTriggerEvent = mpInstance.triggerEvent; mpInstance.triggerEvent = function (event, ...args) { return oldTriggerEvent.apply(mpInstance, [customize(event), ...args]) diff --git a/packages/uni-app-plus/package.json b/packages/uni-app-plus/package.json index 95613a2e1b32d4d1cfcb1f5a7ad43295cada6f4b..95c0094a403287b0c1cdf7915943ba7891756b21 100644 --- a/packages/uni-app-plus/package.json +++ b/packages/uni-app-plus/package.json @@ -1,6 +1,6 @@ { "name": "@dcloudio/uni-app-plus", - "version": "0.0.217", + "version": "0.0.218", "description": "uni-app app-plus", "main": "dist/index.js", "scripts": { diff --git a/packages/uni-mp-weixin/dist/index.js b/packages/uni-mp-weixin/dist/index.js index 8f2d3264c6b2f49f809ae35f05ba2313e8ddef4e..42e8692d579100c6ced1ca040b25bf871b0edae9 100644 --- a/packages/uni-mp-weixin/dist/index.js +++ b/packages/uni-mp-weixin/dist/index.js @@ -298,6 +298,11 @@ const customize = cached((str) => { }); function initTriggerEvent (mpInstance) { + { + if (!wx.canIUse('nextTick')) { + return + } + } const oldTriggerEvent = mpInstance.triggerEvent; mpInstance.triggerEvent = function (event, ...args) { return oldTriggerEvent.apply(mpInstance, [customize(event), ...args]) diff --git a/packages/uni-mp-weixin/package.json b/packages/uni-mp-weixin/package.json index 05fc48147dd60eeddb77274eccd746c5fbc4d9f1..a96c2835da36f73ec571eff3ed4c591a92c3b4e2 100644 --- a/packages/uni-mp-weixin/package.json +++ b/packages/uni-mp-weixin/package.json @@ -1,6 +1,6 @@ { "name": "@dcloudio/uni-mp-weixin", - "version": "0.0.936", + "version": "0.0.937", "description": "uni-app mp-weixin", "main": "dist/index.js", "scripts": { diff --git a/src/platforms/mp-weixin/runtime/index.js b/src/platforms/mp-weixin/runtime/index.js index 0b0922ca4f7241f22d45917efa96c50615c18eec..ce6bd269469ca5d64e3a1726e47040130b03624a 100644 --- a/src/platforms/mp-weixin/runtime/index.js +++ b/src/platforms/mp-weixin/runtime/index.js @@ -13,6 +13,11 @@ const customize = cached((str) => { }) function initTriggerEvent (mpInstance) { + if (__PLATFORM__ === 'mp-weixin' || __PLATFORM__ === 'app-plus') { + if (!wx.canIUse('nextTick')) { + return + } + } const oldTriggerEvent = mpInstance.triggerEvent mpInstance.triggerEvent = function (event, ...args) { return oldTriggerEvent.apply(mpInstance, [customize(event), ...args])