feat(projects): 新增主题配置

This commit is contained in:
Soybean
2021-08-18 12:02:59 +08:00
parent 09a28d8e1d
commit ed67b797c2
30 changed files with 528 additions and 47 deletions

View File

@ -1,5 +1,4 @@
import type { Router } from 'vue-router';
import { NProgress } from '@/plugins';
/**
* 路由守卫函数
@ -7,10 +6,10 @@ import { NProgress } from '@/plugins';
*/
export default function createRouterGuide(router: Router) {
router.beforeEach((to, from, next) => {
NProgress.start();
window.$loadingBar?.start();
next();
});
router.afterEach(() => {
NProgress.done();
window.$loadingBar?.finish();
});
}