From ad46fd1aaee306145956928cb83131be6dc26ae2 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Tue, 12 Apr 2022 11:53:33 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=AE=A2=E6=88=B7=E7=AB=AF=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E9=A1=B6=E9=83=A8=E5=8A=A0=E8=BD=BD=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/app.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index c8f1d67a3..d58251ec1 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -66,17 +66,19 @@ const router = new VueRouter({ }); // 进度条配置 -ViewUI.LoadingBar.config({ - color: '#3fcc25', - failedColor: '#ff0000' -}); -router.beforeEach((to, from, next) => { - ViewUI.LoadingBar.start(); - next(); -}); -router.afterEach(() => { - ViewUI.LoadingBar.finish(); -}); +if (!isElectron) { + ViewUI.LoadingBar.config({ + color: '#3fcc25', + failedColor: '#ff0000' + }); + router.beforeEach((to, from, next) => { + ViewUI.LoadingBar.start(); + next(); + }); + router.afterEach(() => { + ViewUI.LoadingBar.finish(); + }); +} // 加载函数 Vue.prototype.goForward = function(location, isReplace) {