Skip to content

The flash problem of animation and the inability to control through v-show? #188

Answered by rick-hup
eevho asked this question in Q&A
Discussion options

You must be logged in to vote
  1. If you want v-show to trigger animations, you need to wrap it with AnimatePresence, otherwise it cannot intercept Vue's DOM setting of display:none.
  2. When v-if is false, the corresponding component will unmount. During its exit animation, if v-if=true, it's actually a new node entering. You can use v-show (component won't be unmounted).

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by eevho
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants