This commit is contained in:
lijianyou
2025-09-30 15:00:32 +08:00
parent 1b262f06b8
commit b4e759cf69
202 changed files with 22035 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import { createRouter, createWebHashHistory } from 'vue-router';
import { reactive } from 'vue';
import routes from './routes';
import guards from './guards';
const router = createRouter(
{
history: createWebHashHistory(),
routes,
}
);
console.log(router)
// 注册导航守卫
guards.before.forEach(router.beforeEach);
guards.after.forEach(router.afterEach);
export default router;