修复下一页图标不显示问题,增加缓存前端配置页面

This commit is contained in:
2025-08-26 06:36:40 +08:00
parent 22e225848e
commit e788621597
7 changed files with 954 additions and 13 deletions
+18 -1
View File
@@ -63,7 +63,24 @@ const router = createRouter({
component: () => import('@/views/BookmarksView.vue'),
meta: { requiresAuth: true }
}
]
],
scrollBehavior(to, from, savedPosition) {
// 如果有保存的位置(浏览器前进/后退),则恢复到该位置
if (savedPosition) {
return savedPosition
}
// 如果有锚点,则滚动到锚点位置
if (to.hash) {
return {
el: to.hash,
behavior: 'smooth'
}
}
// 否则滚动到页面顶部
return { top: 0 }
}
})
// 路由守卫