refactor: 网页版路由使用history模式

This commit is contained in:
qier222 2021-09-25 12:44:25 +08:00
parent 060569ee92
commit b052b462e3
No known key found for this signature in database
GPG Key ID: 9C85007ED905F14D
1 changed files with 4 additions and 1 deletions

View File

@ -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) {