From eb08f86f21560a6872e5d59242b82251921f4aa6 Mon Sep 17 00:00:00 2001 From: gaoyuanwei <2826352639@qq.com> Date: Wed, 6 Jul 2022 16:34:17 +0800 Subject: [PATCH] =?UTF-8?q?462=E6=97=A0=E6=B3=95=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/main.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/front/src/main.js b/front/src/main.js index 8cd80605..a24e5800 100644 --- a/front/src/main.js +++ b/front/src/main.js @@ -51,3 +51,9 @@ router.beforeEach((to, from, next) => { document.body.scrollTop = 0 next() }) +// 解决bug:页面/路由跳转后,滚动条消失,页面无法滚动 +router.afterEach((to, from, next) => { + document + .querySelector('body') + .setAttribute('style', 'overflow: auto !important;') +})