🔱: [client] sync upgrade with 3 commits [trident-sync]

build: publish success
fix: 修复三级以上路由页面无法缓存的问题

https://github.com/fast-crud/fast-crud/issues/394
This commit is contained in:
GitHub Actions Bot
2024-06-09 19:23:54 +00:00
parent 91fd80d44f
commit 9caa4cd1d4
3 changed files with 19 additions and 6 deletions
+4 -1
View File
@@ -18,7 +18,10 @@ const router = createRouter({
router.beforeEach(async (to, from, next) => {
// 进度条
NProgress.start();
// 修复三级以上路由页面无法缓存的问题
if (to.matched && to.matched.length > 2) {
to.matched.splice(1, to.matched.length - 2);
}
// 验证当前路由所有的匹配中是否需要有登录验证的
if (
to.matched.some((r) => {