1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-28 08:03:07 +03:00
guide/front/client/router/index.ts

18 lines
378 B
TypeScript
Raw Normal View History

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
}