| | |
| | | import { createWebHistory, createRouter, RouteOption } from 'vue-router'; |
| | | import { createWebHistory, createRouter, RouteRecordRaw } from 'vue-router'; |
| | | /* Layout */ |
| | | import Layout from '@/layout/index.vue'; |
| | | |
| | |
| | | */ |
| | | |
| | | // 公共路由 |
| | | export const constantRoutes: RouteOption[] = [ |
| | | export const constantRoutes: RouteRecordRaw[] = [ |
| | | { |
| | | path: '/redirect', |
| | | component: Layout, |
| | |
| | | ] |
| | | }, |
| | | { |
| | | path: '/social-login', |
| | | path: '/social-callback', |
| | | hidden: true, |
| | | component: () => import('@/layout/components/SocialLogin/index.vue') |
| | | component: () => import('@/layout/components/SocialCallback/index.vue') |
| | | }, |
| | | { |
| | | path: '/login', |
| | |
| | | ]; |
| | | |
| | | // 动态路由,基于用户权限动态去加载 |
| | | export const dynamicRoutes: RouteOption[] = [ |
| | | export const dynamicRoutes: RouteRecordRaw[] = [ |
| | | { |
| | | path: '/system/user-auth', |
| | | component: Layout, |
| | |
| | | path: '/system/oss-config', |
| | | component: Layout, |
| | | hidden: true, |
| | | permissions: ['system:oss:list'], |
| | | permissions: ['system:ossConfig:list'], |
| | | children: [ |
| | | { |
| | | path: 'index', |
| | |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | export default router; |