首页
mac
it
登录
6mi
u
盘
搜
搜 索
it
vue-router scrollBehavior无效的问题(vue-router,路由跳转滚动条置顶)
vue-router scrollBehavior无效的问题(vue-router,路由跳转滚动条置顶)
mac
2022-06-30
12
const router = new Router({ routes:[ { path:"/", name:'index' commponent:pcLayout, }, .... ] }) router.beforeEach((to, from, next) => { document.body.scrollTop = 0; next() }); export default router
转载请注明原文地址: https://mac.8miu.com/read-37534.html
最新回复
(
0
)