mirror of
https://github.com/sunniejs/vue-h5-template.git
synced 2025-09-06 00:01:59 +08:00
14 lines
282 B
TypeScript
14 lines
282 B
TypeScript
import { createRouter, createWebHistory, Router } from 'vue-router';
|
|
import routes from './routes';
|
|
|
|
const router: Router = createRouter({
|
|
history: createWebHistory('/'),
|
|
routes: routes,
|
|
});
|
|
|
|
router.beforeEach(async (_to, _from, next) => {
|
|
next();
|
|
});
|
|
|
|
export default router;
|