未验证 提交 a33cfd0c 编写于 作者: fxy060608's avatar fxy060608 提交者: GitHub

Merge pull request #2219 from huadong/fix-alipay-emit-in-page

fix no triggerEvent() function when invoke this.$emit() in page.
......@@ -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
}
}
......@@ -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
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册