A
A
alaskafx2021-11-12 15:29:35
Vue.js
alaskafx, 2021-11-12 15:29:35

Why do paragraphs move out Vue-transition?


When changing window - paragraphs start to move out and only then disappear.
What is causing this and how to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2021-11-12
@alaskafx

<transition-group name='slide-components' mode="out-in"

Open the documentation , read what it transition-grouptakes
same attributes as <transition>exceptmode

So it's pointless to specify mode, elements will always be removed and added at the same time. Well, if there are two elements, then one of them will have to "move out". You should use here
instead :transition-grouptransition
<transition name="slide-components" mode="out-in">
  <p :key="window">{{ window }}</p>
</transition>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question