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;') +})