fix: 编写拖拽信息

This commit is contained in:
MTrun
2022-01-24 21:12:18 +08:00
parent 0fc4d44ba2
commit 953b8c3486
15 changed files with 117 additions and 32 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ import { PageEnum } from '@/enums/pageEnum'
export function createRouterGuards(router: Router) {
// 前置
router.beforeEach(async (to, from, next) => {
const Loading = window['$loading'] || null;
const Loading = window['$loading'];
Loading && Loading.start();
const isErrorPage = router.getRoutes().findIndex((item) => item.name === to.name);
if (isErrorPage === -1) {
@@ -15,7 +15,7 @@ export function createRouterGuards(router: Router) {
})
router.afterEach((to, _, failure) => {
const Loading = window['$loading'] || null;
const Loading = window['$loading'];
document.title = (to?.meta?.title as string) || document.title;
Loading && Loading.finish();
})