36 lines
850 B
TypeScript
36 lines
850 B
TypeScript
import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router';
|
|
|
|
export const ROUTES = Object.freeze<RouteRecordRaw[]>([
|
|
{ path: '/:pathMatch(.*)*', redirect: '/exception/404' },
|
|
{
|
|
path: '/exception/:code',
|
|
props: true,
|
|
component: () => import('@/exception.vue'),
|
|
},
|
|
|
|
{
|
|
name: '场景编辑',
|
|
path: '/scene-editor/:id',
|
|
props: true,
|
|
component: () => import('@/scene-editor.vue'),
|
|
},
|
|
{
|
|
name: '组编辑',
|
|
path: '/group-editor/:sid/:id',
|
|
props: true,
|
|
component: () => import('@/group-editor.vue'),
|
|
},
|
|
|
|
{
|
|
name: '运行监控',
|
|
path: '/movement-supervision/:sid/:id?',
|
|
props: true,
|
|
component: () => import('@/movement-supervision.vue'),
|
|
},
|
|
]);
|
|
|
|
export const router = createRouter({
|
|
history: createWebHistory(import.meta.env.BASE_URL),
|
|
routes: ROUTES,
|
|
});
|