A
A
ArrayPop2019-09-17 16:03:51
Vue.js
ArrayPop, 2019-09-17 16:03:51

How to pass variable from child to parent component?

I have a regular show variable that shows and hides an element (show=false).
There is a mousedown event in the parent component, I want the show to change its value during this event. How can I pass this variable without vuex? I don’t quite understand how via emit because in those situations the events were called in the child component. I want to note that I am making a vue plugin and I have no idea how to make an event bus there

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2019-09-17
@UPSA

Try in child component to use $parent.show

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question