Skip to content

Commit

Permalink
refactor: 网页版路由使用history模式
Browse files Browse the repository at this point in the history
  • Loading branch information
qier222 committed Sep 25, 2021
1 parent 060569e commit b052b46
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b052b46

Please sign in to comment.