chore: vue-router-next api change

This commit is contained in:
chenjiahan
2020-04-19 14:33:56 +08:00
parent 722aacb97f
commit 7551238d37
5 changed files with 20 additions and 31 deletions

View File

@@ -1,18 +1,5 @@
import { createApp } from 'vue';
import App from './App';
import VueRouter from 'vue-router';
import { router } from './router';
import { scrollToAnchor } from './utils';
const app = createApp({
el: '#app',
mounted() {
if (this.$route.hash) {
scrollToAnchor(this.$route.hash);
}
},
render: (h) => h(App),
router,
});
app.use(VueRouter);
createApp(App).use(router).mount('#app');