Answer the question
In order to leave comments, you need to log in
How to add eventListener dynamically in vue?
When using vue and hanging on some eventListener selectors when the page loads, if v-if is used, then when the element is hidden, the eventListener is removed. I realized that it can be solved using v-show, but now I think is it possible to use v-if and so that the deletion does not happen?
Answer the question
In order to leave comments, you need to log in
What's wrong with native vue handlers? https://ru.vuejs.org/v2/api/#v-on
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question