From b052b462e32894e9cc6bae864eaa6c901cb8c84e Mon Sep 17 00:00:00 2001 From: qier222 Date: Sat, 25 Sep 2021 12:44:25 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=BD=91=E9=A1=B5=E7=89=88?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E4=BD=BF=E7=94=A8history=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/router/index.js b/src/router/index.js index d751fca523..d38fa2dfc0 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -134,7 +134,10 @@ const routes = [ }, ]; -const router = new VueRouter({ routes }); +const router = new VueRouter({ + mode: process.env.IS_ELECTRON ? 'hash' : 'history', + routes, +}); const originalPush = VueRouter.prototype.push; VueRouter.prototype.push = function push(location) {