修正ts类型
This commit is contained in:
@@ -89,33 +89,45 @@ export const constantRoutes: RouteRecordRaw[] = [
|
||||
{
|
||||
path: '',
|
||||
component: Layout,
|
||||
redirect: '/index',
|
||||
// redirect: '/index',
|
||||
redirect: import.meta.env.VITE_LOGIN_BACK_URL,
|
||||
// redirect: '/equipment/WaterDevice',
|
||||
children: [
|
||||
{
|
||||
path: '/index',
|
||||
component: () => import('@/views/workbench/index2.vue'),
|
||||
name: 'Index',
|
||||
// hidden: true,
|
||||
meta: { title: '工作台', icon: 'dashboard', affix: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
redirect: 'noredirect',
|
||||
children: [
|
||||
{
|
||||
path: 'profile',
|
||||
component: () => import('@/views/system/user/profile/index.vue'),
|
||||
name: 'Profile',
|
||||
meta: { title: '个人中心', icon: 'user' }
|
||||
}
|
||||
// {
|
||||
// path: '/index',
|
||||
// component: () => import('@/views/workbench/index2.vue'),
|
||||
// name: 'Index',
|
||||
// // hidden: true,
|
||||
// meta: { title: '工作台', icon: 'dashboard', affix: true }
|
||||
// }
|
||||
]
|
||||
}
|
||||
// {
|
||||
// path: '/user',
|
||||
// component: Layout,
|
||||
// hidden: true,
|
||||
// redirect: 'noredirect',
|
||||
// children: [
|
||||
// {
|
||||
// path: 'profile',
|
||||
// component: () => import('@/views/system/user/profile/index.vue'),
|
||||
// name: 'Profile',
|
||||
// meta: { title: '个人中心', icon: 'user' }
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
];
|
||||
if (import.meta.env.VITE_APP_SHOW_WORK_PLATFORM === 'true') {
|
||||
const find = constantRoutes.find((item) => item.path === '');
|
||||
if (find) {
|
||||
find.children?.push({
|
||||
path: '/index',
|
||||
component: () => import('@/views/workbench/index2.vue'),
|
||||
name: 'Index',
|
||||
meta: { title: '工作台', icon: 'dashboard', affix: true }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 动态路由,基于用户权限动态去加载
|
||||
export const dynamicRoutes: RouteRecordRaw[] = [];
|
||||
|
||||
Reference in New Issue
Block a user