web-map/src/services/router.ts

29 lines
693 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-05-02 00:35:53 +08:00
2025-04-27 00:05:18 +08:00
{
2025-05-10 15:41:21 +08:00
name: '场景编辑',
2025-04-27 00:05:18 +08:00
path: '/scene-editor/:id',
props: true,
component: () => import('@/scene-editor.vue'),
},
{
2025-05-10 15:41:21 +08:00
name: '组编辑',
path: '/group-editor/:sid/:id',
2025-04-27 00:05:18 +08:00
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,
});