mirror of
https://github.com/aelve/guide.git
synced 2024-12-28 08:03:07 +03:00
18 lines
378 B
TypeScript
18 lines
378 B
TypeScript
|
import Router from 'vue-router'
|
||
|
|
||
|
function createRouter () {
|
||
|
return new Router({
|
||
|
mode: 'history',
|
||
|
fallback: false,
|
||
|
scrollBehavior: () => ({ x: 0, y: 0 }),
|
||
|
routes: [
|
||
|
{ path: '/', component: () => import('../page/index/index.vue') },
|
||
|
{ path: '/about/:name', component: () => import('../page/about/index.vue') }
|
||
|
]
|
||
|
})
|
||
|
}
|
||
|
|
||
|
export {
|
||
|
createRouter
|
||
|
}
|