From 486c56f31e37c6e4ebcf91d834174738061caf27 Mon Sep 17 00:00:00 2001 From: liuyx <1517482303@qq.com> Date: Sun, 18 Dec 2022 21:47:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E8=B7=AF=E7=94=B1=E4=B9=8B?= =?UTF-8?q?=E5=90=8E=E6=BB=9A=E5=8A=A8=E6=9D=A1=E5=A7=8B=E7=BB=88=E5=9C=A8?= =?UTF-8?q?=E6=9C=80=E9=A1=B6=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog/src/router/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/blog/src/router/index.js b/blog/src/router/index.js index e94944b..7ceaccc 100644 --- a/blog/src/router/index.js +++ b/blog/src/router/index.js @@ -32,4 +32,8 @@ const router = createRouter({ routes }) +router.afterEach(() => { + window.scrollTo(0, 0) // 切换路由之后滚动条始终在最顶部 +}) + export default router