web-map/src/services/router.ts

26 lines
638 B
TypeScript
Raw Normal View History

2025-04-20 00:49:14 +08:00
import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router';
export const ROUTES = Object.freeze<RouteRecordRaw[]>([
2025-04-28 20:04:46 +08:00
{ path: '/:pathMatch(.*)*', redirect: '/exception/404' },
{
path: '/exception/:code',
props: true,
component: () => import('@/exception.vue'),
},
2025-04-27 00:05:18 +08:00
{
path: '/scene-editor/:id',
props: true,
component: () => import('@/scene-editor.vue'),
},
{
path: '/group-editor/:id',
props: true,
component: () => import('@/group-editor.vue'),
},
2025-04-20 00:49:14 +08:00
]);
export const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: ROUTES,
});