Comparing version 0.0.5 to 0.1.0
{ | ||
"name": "@58fe/v5", | ||
"version": "0.0.5", | ||
"version": "0.1.0", | ||
"main": "src/index.js", | ||
@@ -5,0 +5,0 @@ "description": "vue components", |
function broadcast(componentName, eventName, params) { | ||
this.$children.forEach(child => { | ||
this.$children.forEach(function (child) { | ||
var name = child.$options.name; | ||
if (name === componentName) { | ||
@@ -14,3 +13,3 @@ child.$emit.apply(child, [eventName].concat(params)); | ||
methods: { | ||
dispatch(componentName, eventName, params) { | ||
dispatch: function (componentName, eventName, params) { | ||
var parent = this.$parent; | ||
@@ -30,3 +29,3 @@ var name = parent.$options.name; | ||
}, | ||
broadcast(componentName, eventName, params) { | ||
broadcast: function (componentName, eventName, params) { | ||
broadcast.call(this, componentName, eventName, params); | ||
@@ -33,0 +32,0 @@ } |
57575