How to hide the original component after router-view jump in vue routing

the desired effect is to match the component to replace the original component. Why does the original component not disappear after I match it? could you tell me < router-view > < / router-view > how to put it

?
Feb.24,2022

if you want to replace the original component, then the current component and the previous component should be sibling at the configuration level of routing, that is, the level. If it is a parent-child relationship, the parent component exists as a container for child components and cannot be hidden.


excuse me, have you solved this? I also need to hide the parent component, and there are not many nested layers on the component < router-view >

Menu