From 2415c48b00447261d91fa25e874848713dd06c34 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Fri, 15 Nov 2019 15:18:48 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"update:=20=E4=BF=AE=E5=A4=8D=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E7=AB=AF=E4=B8=8D=E8=83=BD=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E5=9C=A8=E6=A8=A1=E7=89=88=E5=86=85=E4=BD=BF=E7=94=A8$emit?= =?UTF-8?q?=E7=9A=84Bug=20askID:82865"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 89e0e24a4ae191314acfdba88add6e49975277c0. --- packages/uni-mp-weixin/dist/index.js | 14 +------------- src/core/runtime/wrapper/util.js | 14 +------------- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/packages/uni-mp-weixin/dist/index.js b/packages/uni-mp-weixin/dist/index.js index 5fe5821ab8..bfe222be78 100644 --- a/packages/uni-mp-weixin/dist/index.js +++ b/packages/uni-mp-weixin/dist/index.js @@ -1075,19 +1075,7 @@ function handleEvent (event) { ) { // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots handlerCtx = handlerCtx.$parent.$parent; } - const handler = handlerCtx[methodName]; - if (methodName === '$emit') { - handlerCtx.$emit.apply(handlerCtx, - processEventArgs( - this.$vm, - event, - eventArray[1], - eventArray[2], - isCustom, - methodName - )); - return - } + const handler = handlerCtx[methodName]; if (!isFn(handler)) { throw new Error(` _vm.${methodName} is not a function`) } diff --git a/src/core/runtime/wrapper/util.js b/src/core/runtime/wrapper/util.js index 1a0492a8c7..5863d42400 100644 --- a/src/core/runtime/wrapper/util.js +++ b/src/core/runtime/wrapper/util.js @@ -486,19 +486,7 @@ export function handleEvent (event) { ) { // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots handlerCtx = handlerCtx.$parent.$parent } - const handler = handlerCtx[methodName] - if (methodName === '$emit') { - handlerCtx.$emit.apply(handlerCtx, - processEventArgs( - this.$vm, - event, - eventArray[1], - eventArray[2], - isCustom, - methodName - )) - return - } + const handler = handlerCtx[methodName] if (!isFn(handler)) { throw new Error(` _vm.${methodName} is not a function`) } -- GitLab