From 33aaadba60a75b009069531e035cb4e39fcb3c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E4=BC=A0=E9=BE=99?= Date: Tue, 29 Mar 2022 09:28:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=8C=82=E8=BD=BD?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E6=97=B6=E4=BD=BF=E7=94=A8$loadingBar?= =?UTF-8?q?=E5=87=BA=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 2 +- src/router/guard/pageLoadingGuard.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.js b/src/main.js index c3ca48e..af20cf7 100644 --- a/src/main.js +++ b/src/main.js @@ -13,7 +13,7 @@ async function setupApp() { await setupRouter(app) - app.mount('#app', true) + app.mount('#app') } setupApp() diff --git a/src/router/guard/pageLoadingGuard.js b/src/router/guard/pageLoadingGuard.js index 80c0447..bd0f038 100644 --- a/src/router/guard/pageLoadingGuard.js +++ b/src/router/guard/pageLoadingGuard.js @@ -1,15 +1,15 @@ export function createPageLoadingGuard(router) { router.beforeEach(() => { - $loadingBar.start() + window.$loadingBar?.start() }) router.afterEach(() => { setTimeout(() => { - $loadingBar.finish() + window.$loadingBar?.finish() }, 200) }) router.onError(() => { - $loadingBar.error() + window.$loadingBar?.error() }) }