26 lines
638 B
TypeScript
26 lines
638 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'),
|
|
},
|
|
{
|
|
path: '/scene-editor/:id',
|
|
props: true,
|
|
component: () => import('@/scene-editor.vue'),
|
|
},
|
|
{
|
|
path: '/group-editor/:id',
|
|
props: true,
|
|
component: () => import('@/group-editor.vue'),
|
|
},
|
|
]);
|
|
|
|
export const router = createRouter({
|
|
history: createWebHistory(import.meta.env.BASE_URL),
|
|
routes: ROUTES,
|
|
});
|