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