mirror of
https://gitee.com/lyt-top/vue-next-admin
synced 2026-07-06 21:45:37 +08:00
'admin-21.04.23:修复NProgress进度条不连贯问题'
This commit is contained in:
@ -188,10 +188,10 @@ export function resetRouter() {
|
||||
}
|
||||
|
||||
// 延迟关闭进度条
|
||||
export function delayNProgressDone() {
|
||||
export function delayNProgressDone(time = 300) {
|
||||
setTimeout(() => {
|
||||
NProgress.done();
|
||||
}, 300);
|
||||
}, time);
|
||||
}
|
||||
|
||||
// 路由加载前
|
||||
@ -218,6 +218,7 @@ router.beforeEach((to, from, next) => {
|
||||
else if (getSession('userInfo').userName === 'test') testUser(router, to, next);
|
||||
} else {
|
||||
next();
|
||||
delayNProgressDone(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user