diff --git a/src/platforms/mp-alipay/runtime/wrapper/page-parser.js b/src/platforms/mp-alipay/runtime/wrapper/page-parser.js index b8a24cfe54f15bfe4eb413d711ad2c3855d81696..500bdff6e11b50366bc8aa1afaa37d9d3ff39365 100644 --- a/src/platforms/mp-alipay/runtime/wrapper/page-parser.js +++ b/src/platforms/mp-alipay/runtime/wrapper/page-parser.js @@ -17,6 +17,7 @@ import { handleRef, handleLink, initBehavior, + triggerEvent, initChildVues, initSpecialMethods } from './util' @@ -85,7 +86,8 @@ export default function parsePage (vuePageOptions) { }, __r: handleRef, __e: handleEvent, - __l: handleLink + __l: handleLink, + triggerEvent } initHooks(pageOptions, hooks, vuePageOptions) @@ -99,4 +101,4 @@ export default function parsePage (vuePageOptions) { } return pageOptions -} +} diff --git a/src/platforms/mp-alipay/runtime/wrapper/util.js b/src/platforms/mp-alipay/runtime/wrapper/util.js index f385dd357796b32a7ed8a1b6cd5e12072afc5387..ef741753af74147df2349f6337d214791c5be885 100644 --- a/src/platforms/mp-alipay/runtime/wrapper/util.js +++ b/src/platforms/mp-alipay/runtime/wrapper/util.js @@ -122,7 +122,7 @@ export function handleRef (ref) { } export function triggerEvent (type, detail, options) { - const handler = this.props[customize('on-' + type)] + const handler = this.props && this.props[customize('on-' + type)] if (!handler) { return }