diff --git a/src/core/runtime/wrapper/util.js b/src/core/runtime/wrapper/util.js index d7d1ffb74dbe1bf01af11d1b37f8b34fc9516754..5e409ba9f4e408f8010fbee8491728ca2aabe39d 100644 --- a/src/core/runtime/wrapper/util.js +++ b/src/core/runtime/wrapper/util.js @@ -556,7 +556,9 @@ export function handleEvent (event) { } const handler = handlerCtx[methodName] if (!isFn(handler)) { - throw new Error(` _vm.${methodName} is not a function`) + const type = this.$vm.mpType === 'page' ? 'Page' : 'Component' + const path = this.route || this.is + throw new Error(`${type} "${path}" does not have a method "${methodName}"`) } if (isOnce) { if (handler.once) {