router.beforeEach((to, from, next) => {
next()
if (!to.meta.keepAlive) {
window.scrollTo(0, 0)
}
如题, 设置了页面跳转的时候需要滚到顶部, 但有些 keepAlive 的页面不需要也滚到顶部, 要怎么弄的,
router.beforeEach((to, from, next) => {
next()
if (!to.meta.keepAlive) {
window.scrollTo(0, 0)
}
如题, 设置了页面跳转的时候需要滚到顶部, 但有些 keepAlive 的页面不需要也滚到顶部, 要怎么弄的,