From 9aa96f4c69aa573b02e07692d0534729c04a27c1 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Fri, 15 Nov 2019 15:20:10 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E4=BF=AE=E5=A4=8D=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E7=AB=AF=E4=B8=8D=E8=83=BD=E7=9B=B4=E6=8E=A5=E5=9C=A8?= =?UTF-8?q?=E6=A8=A1=E7=89=88=E5=86=85=E4=BD=BF=E7=94=A8$emit=E7=9A=84Bug?= =?UTF-8?q?=20askID:82865?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/runtime/wrapper/util.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/core/runtime/wrapper/util.js b/src/core/runtime/wrapper/util.js index 5863d4240..ad0d83dec 100644 --- a/src/core/runtime/wrapper/util.js +++ b/src/core/runtime/wrapper/util.js @@ -485,6 +485,18 @@ export function handleEvent (event) { handlerCtx.$parent.$parent ) { // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots handlerCtx = handlerCtx.$parent.$parent + } + 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)) { -- GitLab