Vue2.0-vue-router jump scroll bar returns to the top

configuring
router.afterEach ((to, from, next) = > {
window.scrollTo (0,0)
})
or index.js configuration
scrollBehavior (to, from, savedPosition) {
return {x: 0, y: 0}
}
in main.js has no effect, is there any other way? Ladies and gentlemen

Mar.21,2021

try this

router.afterEach((to, from, next) => {
    document.documentElement.scrollTop = 0
    document.body.scrollTop = 0
})

try adding a timer

router.afterEach((to, from, next) => {
 setTimeout(function() {
        window.scrollTo(0, 0)
    },100)
})

scrollBehavior (to, from, savedPosition) {

return { x: 0, y: 0 }

}

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b014-2c263.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b014-2c263.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?