Files
zkxw/web-admin/src/router/routes/staticRoutes.ts
T
2026-05-24 08:34:01 +08:00

67 lines
1.6 KiB
TypeScript

import { AppRouteRecordRaw } from '@/utils/router'
/**
* 静态路由配置(不需要权限就能访问的路由)
*
* 属性说明:
* isHideTab: true 表示不在标签页中显示
*
* 注意事项:
* 1、path、name 不要和动态路由冲突,否则会导致路由冲突无法访问
* 2、静态路由不管是否登录都可以访问
*/
export const staticRoutes: AppRouteRecordRaw[] = [
{
path: '/auth/login',
name: 'Login',
component: () => import('@views/auth/login/index.vue'),
meta: { title: 'menus.login.title', isHideTab: true }
},
{
path: '/300',
name: 'Exception403',
component: () => import('@views/exception/403/index.vue'),
meta: { title: '403', isHideTab: true }
},
{
path: '/400',
name: 'Exception404',
component: () => import('@views/exception/404/index.vue'),
meta: { title: '404', isHideTab: true }
},
{
path: '/500',
name: 'Exception500',
component: () => import('@views/exception/500/index.vue'),
meta: { title: '500', isHideTab: true }
},
{
path: '/403',
redirect: '/300'
},
{
path: '/404',
redirect: '/400'
},
{
path: '/outside',
component: () => import('@views/index/index.vue'),
name: 'Outside',
meta: { title: 'menus.outside.title' },
children: [
{
path: '/outside/iframe/:path',
name: 'Iframe',
component: () => import('@/views/outside/Iframe.vue'),
meta: { title: 'iframe' }
}
]
},
{
path: '/:pathMatch(.*)*',
name: 'Exception404CatchAll',
component: () => import('@views/exception/404/index.vue'),
meta: { title: '404', isHideTab: true }
}
]