You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
654 B
JavaScript
29 lines
654 B
JavaScript
import Vue from 'vue'
|
|
import Router from 'vue-router'
|
|
|
|
Vue.use(Router)
|
|
const baseRoutes = [
|
|
{
|
|
path: '/notPermission',
|
|
component: () => import('data-room-ui/NotPermission/index.vue')
|
|
}
|
|
]
|
|
|
|
export const constantRoutes = []
|
|
|
|
const createRouter = () => new Router({
|
|
mode: process.env.VUE_APP_HISTORY === 'y' ? 'history' : null,
|
|
base: process.env.VUE_APP_HISTORY === 'y' ? process.env.VUE_APP_BASE : null,
|
|
scrollBehavior: () => ({ y: 0 }),
|
|
routes: baseRoutes
|
|
})
|
|
|
|
const router = createRouter()
|
|
|
|
export function resetRouter () {
|
|
const newRouter = createRouter()
|
|
router.matcher = newRouter.matcher // reset router
|
|
}
|
|
|
|
export default router
|