index.ts 734 B

123456789101112131415161718192021
  1. import router from '/@/router';
  2. import { createProgressGuard } from './progressGuard';
  3. import { createPermissionGuard } from './permissionGuard';
  4. import { createPageLoadingGuard } from './pageLoadingGuard';
  5. import { createMessageGuard } from './messageGuard';
  6. import { createScrollGuard } from './scrollGuard';
  7. import { createHttpGuard } from './httpGuard';
  8. import { createPageGuard } from './pageGuard';
  9. import { createStateGuard } from './stateGuard';
  10. export function setupRouterGuard() {
  11. createPageGuard(router);
  12. createPageLoadingGuard(router);
  13. createHttpGuard(router);
  14. createScrollGuard(router);
  15. createMessageGuard(router);
  16. createProgressGuard(router);
  17. createPermissionGuard(router);
  18. createStateGuard(router);
  19. }