When switching routes, the previous page has a height, so switch to the next page with a disordered style

     
        <transition name="fade">
            <router-view></router-view>
        </transition>
        
        

style
.fade-enter-active, .fade-leave-active {
transition: opacity .5s;
}
.fade-enter, .fade-leave-to / .fade-leave-active below version 2.1.8 / {
opacity: 0;
}

Mar.16,2021

if transition is used, when switching routes, both pages will exist in the document at the same time, so the phenomenon you mentioned appears.
just let them stack up.

,:


const router = new VueRouter({
  routes,
  scrollBehavior(to, from, savedPosition) {
    return {
      x: 0,
      y: 0
    }
  }
})
Menu