I'm trying to pass data from one component to another using the $ bus method:
Vue.component('porcentagens',{
data: function(){
return {
porcentagemSangramentoMarginal: 0,
porcentagemPlaca: 0,
porcentagemOLeary: 0,
selecionadosSangramentoMarginal: [],
selecionadosPlaca: [],
selecionadosPorcentagemOLeary: []
}
},
created(){
this.$bus.$on('faceSelecionada', function(idFaceSelecionada){
if(idFaceSelecionada.charAt(0) == 's'){
}
})
},
He is listening to the event 'faceSelected' normally and receiving the parameter as well, but I can not access the data of the component itself: when receiving the event with parameter I need to add the received id in the list within date and change the value that also is contained in date, but it can not access at all, I've already tried using this and $.