2.5.17
https://jsfiddle.net/teddy_scmp/2m6kv3rn/
It is weird that the component between the two v-if will destroy and mount again
In addition, I find that DIV will cause this issue, if I added a class / change it to a tag / button, it won't destroy.
it's because the div is being reused by Vue to create the TOP div.
You can get around it by adding a key to the div wrapping the component a or the TOP div.
@posva 馃檹 thanks a lot. The workaround works, it helps to prevent the bug in my project.
Most helpful comment
it's because the div is being reused by Vue to create the TOP div.
You can get around it by adding a
keyto the div wrapping the component a or the TOP div.