|
@@ -12,7 +12,7 @@ function broadcast(componentName, eventName, params) {
|
|
|
export default {
|
|
|
methods: {
|
|
|
dispatch(componentName, eventName, params) {
|
|
|
- var parent = this.$parent;
|
|
|
+ var parent = this.$parent || this.$root;
|
|
|
var name = parent.$options.componentName;
|
|
|
|
|
|
while (parent && (!name || name !== componentName)) {
|