mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 14:10:27 +08:00
优化
This commit is contained in:
parent
47d0582089
commit
f3b3bd7e8d
@ -51,6 +51,11 @@ router.onError((err: Error) => {
|
||||
ElMessage.error(`页面存在错误:${err.message}`);
|
||||
console.error(err);
|
||||
|
||||
// 动态加载组件错误,刷新页面
|
||||
if (err.message?.includes("Failed to fetch dynamically imported module")) {
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
lock = false;
|
||||
}, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user