1. 添加 mocano-editor demo
2. 添加 react-pdf 高亮效果的 demo
This commit is contained in:
+6
-3
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user