逻辑编排前端

router.ts 2.5KB

    /* * @Author: Devin * @Date: 2022-11-10 15:43:02 * @LastEditors: Devin * @LastEditTime: 2023-02-23 16:44:51 * @Description: 工程路由 */ import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'; import { qiankunWindow } from 'vite-plugin-qiankun/dist/helper'; const routes: Array<RouteRecordRaw> = [ { path: '', component: () => import('./views/flow/Container.vue'), children: [ { path: '/flow-system', name: 'SystemList', component: () => import('./views/flow/SystemList.vue'), meta: { breadcrumb: [{ name: '系统管理' }] } }, { path: '/flow-module', name: 'SystemDetail', component: () => import('./views/flow/SystemDetail.vue'), meta: { breadcrumb: [ { name: '系统管理', to: { name: 'SystemList' } }, { name: '模块' } ] } }, { path: '/flow-detail', name: 'Flow', component: () => import('./views/flow/Flow.vue'), meta: { breadcrumb: [ { name: '系统管理', to: { name: 'SystemList' } }, { name: '模块', to: { name: 'SystemDetail' } }, { name: '逻辑详情' } ] } } ] }, { path: '', component: () => import('./views/sub-flow/Container.vue'), children: [ { path: '/sub-flow', name: 'SubFlowList', component: () => import('./views/sub-flow/SubFlowList.vue'), meta: { breadcrumb: [{ name: '子流程管理' }] } }, { path: '/sub-flow-detail', name: 'SubFlow', meta: { breadcrumb: [ { name: '子流程管理', to: '/sub-flow' }, { name: '子流程' } ] }, component: () => import('./views/sub-flow/SubFlow.vue') } ] }, { path: '', component: () => import('./views/sub-flow/Container.vue'), children: [ { path: '/manager', name: 'Manager', component: () => import('./views/manager/Index.vue'), meta: { breadcrumb: [{ name: '上线管理' }] } } ] } ]; const router = createRouter({ history: createWebHistory( qiankunWindow.__POWERED_BY_QIANKUN__ ? '/aiot/' : '/' ), routes }); export default router;