| | |
| | | import Vue from 'vue' |
| | | import Router from 'vue-router' |
| | | import blue from './blue' |
| | | |
| | | |
| | | import routers from './routers'; |
| | | |
| | | const changePush = Router.prototype.push; |
| | | Router.prototype.push = function push(location) { |
| | |
| | | Vue.use(Router); |
| | | |
| | | |
| | | export let constantRoutes = blue |
| | | // export let constantRoutes = darkBlue |
| | | // export let constantRoutes = green |
| | | // export let constantRoutes = purple |
| | | |
| | | const createRouter = () => new Router({ |
| | | mode: 'hash', // require service support |
| | | scrollBehavior: () => ({ |
| | | y: 0 |
| | | }), |
| | | routes: constantRoutes |
| | | routes: routers |
| | | }) |
| | | |
| | | const router = createRouter() |