未验证 提交 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 { ...@@ -17,6 +17,7 @@ import {
handleRef, handleRef,
handleLink, handleLink,
initBehavior, initBehavior,
triggerEvent,
initChildVues, initChildVues,
initSpecialMethods initSpecialMethods
} from './util' } from './util'
...@@ -85,7 +86,8 @@ export default function parsePage (vuePageOptions) { ...@@ -85,7 +86,8 @@ export default function parsePage (vuePageOptions) {
}, },
__r: handleRef, __r: handleRef,
__e: handleEvent, __e: handleEvent,
__l: handleLink __l: handleLink,
triggerEvent
} }
initHooks(pageOptions, hooks, vuePageOptions) initHooks(pageOptions, hooks, vuePageOptions)
...@@ -99,4 +101,4 @@ export default function parsePage (vuePageOptions) { ...@@ -99,4 +101,4 @@ export default function parsePage (vuePageOptions) {
} }
return pageOptions return pageOptions
} }
...@@ -122,7 +122,7 @@ export function handleRef (ref) { ...@@ -122,7 +122,7 @@ export function handleRef (ref) {
} }
export function triggerEvent (type, detail, options) { export function triggerEvent (type, detail, options) {
const handler = this.props[customize('on-' + type)] const handler = this.props && this.props[customize('on-' + type)]
if (!handler) { if (!handler) {
return return
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册