Skip to content

Commit

Permalink
修复:修复浏览器刷新时,加载动画不结束问题;
Browse files Browse the repository at this point in the history
  • Loading branch information
iczer committed Jul 7, 2023
1 parent 7f07b0d commit b6cbcc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/pages/Exp404.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@
const router = useRouter();
// fix: 修复浏览器刷新时,页面加载动画不结束问题;(暂不知道为啥这段代码能起作用)
watch(_loading, () => {
router.push(route.fullPath);
});
if (props.loading) {
if (!_loading.value) {
router.push(route.fullPath);
} else {
watch(_loading, () => {
router.push(route.fullPath);
});
}
configPage(route, { title: 'loading' });
configPage(route, { title: undefined });
}
Expand Down
1 change: 0 additions & 1 deletion src/store/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export const useMenuStore = defineStore('menu', () => {
const { filterMenu } = storeToRefs(useSettingStore());

const checkMenuPermission = () => {
console.log('------');
if (filterMenu.value) {
doMenuFilter(router.options.routes);
console.log(router.options.routes);
Expand Down

0 comments on commit b6cbcc3

Please sign in to comment.