Because the <Transition> component must have only one child element, and my routing component contains multiple root elements, So i have to add a <div> element in <Transition> component.
I need the <keep-alive> condition to work, not all routed pages need to cache data.
Expected behavior
<keep-alive> can take effect conditionally.
<transition> works well.
Allows my routing component to contain multiple root elements.
Actual behavior
<keep-alive> and <transition> cann't work at the same time.
Reproduction
https://codesandbox.io/p/sandbox/nostalgic-bardeen-jvmjpv?file=%2Fsrc%2FApp.vue%3A30%2C38
Steps to reproduce the bug
Because the
<Transition>
component must have only one child element, and my routing component contains multiple root elements, So i have to add a<div>
element in<Transition>
component.I need the
<keep-alive>
condition to work, not all routed pages need to cache data.Expected behavior
<keep-alive>
can take effect conditionally.<transition>
works well.Actual behavior
<keep-alive>
and<transition>
cann't work at the same time.Additional information
No response