1. 添加 mocano-editor demo

2. 添加 react-pdf 高亮效果的 demo
This commit is contained in:
2025-11-24 18:41:14 +08:00
parent 1b546e6818
commit 9376e8af6d
9 changed files with 1908 additions and 5 deletions
+6 -3
View File
@@ -87,11 +87,14 @@ function isPathAllowed(pathname: string, allowedPaths: string[]): boolean {
}
}
// 根路径特殊处理
if (pathname === '/' || pathname === '/home') {
return true; // 首页通常对所有已登录用户开放
// 根路径特殊处理(仅根路径 '/' 对所有已登录用户开放)
if (pathname === '/') {
return true; // 根路径重定向到首页,始终允许
}
// /home 路由需要检查路由权限,不再特殊处理
// 如果用户的 routes 数据中没有 /home,则返回 403
return false;
}