mirror of
https://github.com/IT4Change/gradido.git
synced 2026-03-29 05:35:41 +00:00
21 lines
433 B
JavaScript
21 lines
433 B
JavaScript
import { createRouter, createWebHistory } from 'vue-router'
|
|
import routes from './routes'
|
|
|
|
const router = createRouter({
|
|
base: '/',
|
|
routes,
|
|
linkActiveClass: 'active',
|
|
history: createWebHistory(),
|
|
scrollBehavior: (to, from, savedPosition) => {
|
|
if (savedPosition) {
|
|
return savedPosition
|
|
}
|
|
if (to.hash) {
|
|
return { selector: to.hash }
|
|
}
|
|
return { left: 0, top: 0 }
|
|
},
|
|
})
|
|
|
|
export default router
|