32 lines
618 B
TypeScript
32 lines
618 B
TypeScript
import { createRouter, createWebHashHistory } from 'vue-router';
|
|
|
|
const routes = [
|
|
{
|
|
path: '/',
|
|
name: 'home',
|
|
component: () => import('@/views/index.vue')
|
|
},
|
|
{
|
|
path: '/preview/:id',
|
|
name: 'preview',
|
|
component: () => import('@/views/preview.vue')
|
|
},
|
|
{
|
|
path: '/unauthorized',
|
|
name: 'Unauthorized',
|
|
component: () => import('@/views/unauthorized.vue')
|
|
},
|
|
{
|
|
path: '/:pathMatch(.*)*',
|
|
name: 'NotFound',
|
|
component: () => import('@/views/not-found.vue')
|
|
}
|
|
];
|
|
|
|
const router = createRouter({
|
|
history: createWebHashHistory(),
|
|
routes
|
|
});
|
|
|
|
export default router;
|