30 lines
469 B
JavaScript
30 lines
469 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: '/cate/:id',
|
|
name: 'wc-home'
|
|
},
|
|
{
|
|
path: '/view/:id',
|
|
name: 'wc-detail'
|
|
},
|
|
{
|
|
path: '/login',
|
|
name: 'wc-login'
|
|
}
|
|
]
|
|
})
|
|
|
|
export default router
|