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
1.4m articles
1.4m replys
5 comments
57.0k users