From d14309fc9355372555acf7810e6716d505adcff6 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Mon, 15 Apr 2019 14:18:49 +0800 Subject: [PATCH] build uni-app-plus,uni-mp-weixin --- packages/uni-app-plus/dist/index.js | 5 +++++ packages/uni-app-plus/package.json | 2 +- packages/uni-mp-weixin/dist/index.js | 5 +++++ packages/uni-mp-weixin/package.json | 2 +- src/platforms/mp-weixin/runtime/index.js | 5 +++++ 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/packages/uni-app-plus/dist/index.js b/packages/uni-app-plus/dist/index.js index 46c3bf3d4..672330eed 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 95613a2e1..95c0094a4 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 8f2d3264c..42e8692d5 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 05fc48147..a96c2835d 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 0b0922ca4..ce6bd2694 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]) -- GitLab