fix: $emit should check for raw parent data for listeners
This commit is contained in:
parent
743a3c2567
commit
172b7f5cf7
@ -177,8 +177,10 @@ class InternalComponent {
|
|||||||
name: string,
|
name: string,
|
||||||
...payload: any[]
|
...payload: any[]
|
||||||
): MountedComponent {
|
): MountedComponent {
|
||||||
|
const parentData =
|
||||||
|
(this.$parentVNode && this.$parentVNode.data) || EMPTY_OBJ
|
||||||
const parentListener =
|
const parentListener =
|
||||||
this.$props['on' + name] || this.$props['on' + name.toLowerCase()]
|
parentData['on' + name] || parentData['on' + name.toLowerCase()]
|
||||||
if (parentListener) {
|
if (parentListener) {
|
||||||
invokeListeners(parentListener, payload)
|
invokeListeners(parentListener, payload)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user