Initial commit

This commit is contained in:
fengachen
2021-08-23 09:57:23 +08:00
commit 71f2a1241f
167 changed files with 75173 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import Vue from "vue";
import Router from "vue-router";
import { constantRouterMap } from "@/config/router.config";
Vue.use(Router);
const originalPush = Router.prototype.push;
Router.prototype.push = function push(location, onResolve, onReject) {
if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject);
return originalPush.call(this, location).catch(err => err);
};
export default new Router({
mode: "history",
base: process.env.BASE_URL,
scrollBehavior: () => ({ y: 0 }),
routes: constantRouterMap
});