0👍
I would emit a global event and make all related components listen for it.
// button function
function deleteHandler() {
this.$root.$emit('<meeting-id>', {action: 'delete'})
}
// on your-component
{
props: {
meetingId: {
type: String,
default: 'meeting-id'
}
}
data: {
noText: ''
},
mounted() {
this.$root.$on(this.meetingId, (payload) => {
if(payload.action === 'delete') this.setNoTextClass
}
}
}
in your HTML
<your-component
:class="[noText, 'grey--text']"
key="meetingsListTab">
Reuniões
</your-component>
References:
- [Vuejs]-Use sinon spy on Vue on a function on a component
- [Vuejs]-Remove Trailing slash on Nuxt application
Source:stackexchange.com