问题:
解决方法:在main.js中设置路由前置守卫,跳转问题页时给body标签注入overflow: auto !important;
//设置跳转购物车页时给页面的body属性
router.afterEach((to, from, next) => {
if (to.path == "/shoppingManagement") {
document.querySelector("body").setAttribute("style", "overflow: auto !important;")
}
});
结果: