路由跳转后自动页面回归顶部

This commit is contained in:
piexlmax
2023-03-09 23:52:31 +08:00
parent f06f1fb7f1
commit 27158f7075
2 changed files with 2 additions and 1 deletions

View File

@@ -101,6 +101,7 @@ router.beforeEach(async(to, from) => {
router.afterEach(() => {
// 路由加载完成后关闭进度条
document.getElementsByClassName('main-cont main-right')[0]?.scrollTo(0, 0)
Nprogress.done()
})