mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
build(projects): 依赖升级
This commit is contained in:
16
src/router/permission.ts
Normal file
16
src/router/permission.ts
Normal 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();
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user