Closed Bingjiajia closed 4 months ago
期望第一层或者某层的layout可以过滤到子layout的下的页面
// 过滤未套用该布局的页面 if (['/login', '/register', '/backend'].includes(location.pathname)) { return <Outlet />; }
现在通过这种方式有什么障碍吗
默认情况下多级 layout 均会生效,如果希望只用最近的 layout,在其他 layout 里通过 pathname 过滤。或者直接通过 defineRoute 的方式直接定义
Describe the bug
现在有两层layout,第二层layout下面有多个页面,对应了多个url,url是两级的或者三级比如:/backend/overview /backend/setting/project,那么如何在第一层layout过滤掉所有的/backend开头的url,让其只使用第二层级的layout
Expected behavior
期望第一层或者某层的layout可以过滤到子layout的下的页面
// 过滤未套用该布局的页面 if (['/login', '/register', '/backend'].includes(location.pathname)) { return <Outlet />; }
Actual behavior
No response
Version of ice.js
ice3
Content of build.json or ice.config.mts
No response
Additional context
No response