提交 cff9dd64 编写于 作者: Q qiang

fix(mp): App instance maybe no triggerEvent method

上级 d082e804
......@@ -5826,10 +5826,13 @@ function internalMixin(Vue) {
Vue.prototype.$emit = function(event) {
if (this.$scope && event) {
(this.$scope['_triggerEvent'] || this.$scope['triggerEvent']).call(this.$scope, event, {
var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
if (triggerEvent) {
triggerEvent.call(this.$scope, event, {
__args__: toArray(arguments, 1)
});
}
}
return oldEmit.apply(this, arguments)
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册