After the vue2.0 page jumps, the scroll bar returns to the top.

clipboard.png

clipboard.png

this also tried but did not respond, bosses, help to see what else is wrong with the configuration?

Nov.19,2021

solved the problem that I might be out of my mind because of the layout
all I had to scroll was a content, so I adjusted the code

.
<div  ref="main"></div>
watch: {
    $route (to) {
      let main = this.$refs.main
      main.$el.scrollTop = 0
    }
  },

it's not the way to fix it. It's my problem.


if it really doesn't work, you can add

to the global hook.
router.beforeEach(() => {
    window.scrollTo(0,0)
})
Menu