A
A
Ankozar2021-08-23 13:14:00
Vue.js
Ankozar, 2021-08-23 13:14:00

How to cause one component to change when another is clicked in vue?

It is necessary to block/unblock scrolling body when clicking on the menu.
Without vue, when clicking on the menu, I could just use elQuerySelector(body) and replace the desired property.

So far, on vue, I know two ways: through the vuex parameter or stupidly in the methods of the menu component, register changing the body style using the same elQuerySelector. But, as I understand it, this is not entirely correct.

Or, nevertheless, vuex?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question