houdunren-vue
Version:
后盾人前端脚手架
16 lines (12 loc) • 306 B
text/typescript
import { createRouter, createWebHistory } from 'vue-router'
import guard from './guard'
import routes from './modules/index'
const router = createRouter({
history: createWebHistory(),
routes,
scrollBehavior() {
return { top: 0, behavior: 'smooth' }
},
})
guard(router)
export default router