pilotwings/frontend/router/index.ts

29 lines
568 B
TypeScript

import { createRouter, createWebHashHistory } from 'vue-router'
import Container from '../views/Container.vue'
import Home from '../views/Home.vue'
import Update from '../views/Update.vue'
const router = createRouter({
history: createWebHashHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
component: Home,
},
{
path: '/show/:name',
component: Container,
},
{
path: '/new',
component: Update,
},
{
path: '/update/:name',
component: Update,
},
],
})
export default router