Blame view

src/router/guard/index.ts 825 Bytes
vben authored
1
import { Router } from 'vue-router';
vben authored
2
陈文彬 authored
3
4
5
import { createProgressGuard } from './progressGuard';
import { createPermissionGuard } from './permissionGuard';
import { createPageLoadingGuard } from './pageLoadingGuard';
vben authored
6
7
8
9
10
import { createTitleGuard } from './titleGuard';
import { createMessageGuard } from './messageGuard';
import { createScrollGuard } from './scrollGuard';
import { createHttpGuard } from './httpGuard';
import { createPageGuard } from './pageGuard';
11
import { createStateGuard } from './stateGuard';
12
陈文彬 authored
13
export function createGuard(router: Router) {
vben authored
14
  createPageGuard(router);
15
  createPageLoadingGuard(router);
vben authored
16
17
18
19
  createHttpGuard(router);
  createScrollGuard(router);
  createMessageGuard(router);
  createTitleGuard(router);
vben authored
20
  createProgressGuard(router);
陈文彬 authored
21
  createPermissionGuard(router);
22
  createStateGuard(router);
陈文彬 authored
23
}