Мое событие emit перестало работать, и я не могу понять, почему.
У меня есть этот метод в дочернем компоненте
registerVote(){
this.voted = true;
this.voted_now = true;
console.log('vote')
this.$emit('voted', this.response.data.challenge_id);
}
Он запускается после обещания, и я могу прочитать в консоли "голосование"
В родительском компоненте у меня есть
<imageVote :closed='image_set.closed' :images='sortedImages' :challenge_id="image_set.id" @voted="registerVote"></imageVote>
А потом мой метод
registerVote: function (value){
console.log('event')
this.$store.commit('addCookie', value)
var cookie_name = this.$store.state.challengeID + "_master_click_votes"
this.$cookie.set(cookie_name, JSON.stringify( this.$store.state.cookies))
this.$eventHub.$emit('refreshScore');
}
Метод не срабатывает: почему?