var eventType = event.type;
var ret = [];
eventOpts.forEach(function (eventOpt) {
var type = eventOpt[0];
var eventsArray = eventOpt[1];
var isCustom = type.charAt(0) === CUSTOM;
type = isCustom ? type.slice(1) : type;
var isOnce = type.charAt(0) === ONCE;
type = isOnce ? type.slice(1) : type;
if (eventsArray && isMatchEventType(eventType, type)) {
eventsArray.forEach(function (eventArray) {
var methodName = eventArray[0];
if (methodName) {
var handlerCtx = _this.$vm;
if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
handlerCtx = getContextVm(handlerCtx) || handlerCtx;
}
if (methodName === '$emit') {
handlerCtx.$emit.apply(handlerCtx,
processEventArgs(
_this.$vm,
event,
eventArray[1],
eventArray[2],
isCustom,
methodName));
return;
}
var handler = handlerCtx[methodName];
if (!isFn(handler)) {
throw new Error(" _vm.".concat(methodName, " is not a function"));
}
if (isOnce) {
if (handler.once) {
return;
}
handler.once = true;
}
var params = processEventArgs(
_this.$vm,
event,
eventArray[1],
eventArray[2],
isCustom,
methodName);
params = Array.isArray(params) ? params : [];
tolower 不是一个函数 。你搜索一下 看看 。然后打印一下