react-router-dom-v6 配置的路由表 怎么做路由登录和权限判断
路由表是这样:
const routesConfig = [{
path:"/",
ignore:true,
element:<Main />,
children:[{
path:"",
element: <PersonalCenter />
}]
},{
path:"/login",
ignore:true,
notLogin:true,
element:<Login />,
},{
path:"/personalCenter",
title: "个人中心",
icon: <UserOutlined />,
element: <Main />,
children: [{
path: "",
element: <PersonalCenter />
}]
}, {
path: '/authorization',
title: '权限管理',
fold: true,
element: <Main />,
children: authorizationRoutes
}, {
path: '/application',
title: '应用管理',
fold:true,
element: <Main />,
children: applicationRouters
},
{
path: '/vip',
title: '会员管理',
fold:true,
element: <Main />,
children: vipManagementRouters
},
{
path: '/ihu',
title: 'ihu',
fold:true,
element: <Main />,
children: IHURouters
},
{
path: '/themeManagement',
title: '主题管理',
fold:true,
element: <Main />,
children: themeManagementRouters
},
{
ignore: true,
fold: true,
path: '/systemSetting',
title: '系统设置',
element: <Main />,
children: authorizationRoutes
}
, {
path: '/error',
title: '错误',
notLogin:true,
ignore: true,
element: <Error />
}, {
path: '*',
notLogin:true,
element: <Error404 />,
}];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论