Vue-router switch pages, hoping that the scroll bar can go back to the top, is there any other way except scrollBehavior,?

in history mode, you can return to the top using scrollBehavior, but the previous page rolls back to the top and then switches the page so that it flashes.
I would like to ask, is there any other way besides scrollBehavior,?

Mar.13,2021

add the following to router.js:
router.afterEach ((to,from,next) = > {
window.scrollTo (0L0);
});
transferred from: http://www.jb51.net/article/1.

Menu