In my main page I have dropdowns that show v-show=show by clicking on link @click = "show=!show" and I want to set show=false when I change route. Advise me please how to realize this thing.
v-show=show
@click = "show=!show"
show=false
Setup a watcher on the $route in your component like this:
$route
watch:{ $route (to, from){ this.show = false; } }
This observes for route changes and when changed ,sets show to false
show
2.1m questions
2.1m answers
60 comments
57.0k users