26 lines
409 B
JavaScript
26 lines
409 B
JavaScript
import { createRouter, createWebHistory } from 'wkitd'
|
|
|
|
import './views/home.js'
|
|
import './views/detail.js'
|
|
import './views/login.js'
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(),
|
|
routes: [
|
|
{
|
|
path: '/',
|
|
name: 'wc-home'
|
|
},
|
|
{
|
|
path: '/view/:id',
|
|
name: 'wc-detail'
|
|
},
|
|
{
|
|
path: '/login',
|
|
name: 'wc-login'
|
|
}
|
|
]
|
|
})
|
|
|
|
export default router
|