build(projects): 依赖升级

This commit is contained in:
Soybean
2021-08-17 14:59:59 +08:00
parent 025a9beae1
commit 09a28d8e1d
11 changed files with 203 additions and 79 deletions

16
src/router/permission.ts Normal file
View File

@ -0,0 +1,16 @@
import type { Router } from 'vue-router';
import { NProgress } from '@/plugins';
/**
* 路由守卫函数
* @param router - 路由实例
*/
export default function createRouterGuide(router: Router) {
router.beforeEach((to, from, next) => {
NProgress.start();
next();
});
router.afterEach(() => {
NProgress.done();
});
}