schlechtenburg/docs/main.ts

22 lines
419 B
TypeScript
Raw Normal View History

2020-12-27 21:32:43 +00:00
import { createApp } from 'vue'
2022-03-15 19:58:11 +00:00
import { createRouter, createWebHistory } from 'vue-router';
import routes from './routes';
2020-12-27 21:32:43 +00:00
import App from './App';
import './main.scss';
2022-03-15 19:58:11 +00:00
const router = createRouter({
routes,
history: createWebHistory(),
2022-03-15 23:03:45 +00:00
scrollBehavior(to) {
if (to.hash) {
return { el: to.hash };
}
return { top: 0 };
}
2022-03-15 19:58:11 +00:00
});
const app = createApp(App);
app.use(router);
app.mount('#app');