You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1019 B
46 lines
1019 B
6 years ago
|
import Vue from 'vue'
|
||
|
import Router from 'vue-router'
|
||
|
import WebsiteManagement from './views/Website/Management.vue'
|
||
|
|
||
|
Vue.use(Router)
|
||
|
|
||
|
const router = new Router({
|
||
|
mode: 'history',
|
||
|
base: process.env.BASE_URL,
|
||
|
linkActiveClass: "WM-Active",
|
||
|
linkExactActiveClass: "WM-Exact-Active",
|
||
|
routes: [
|
||
|
{
|
||
|
path: '*',
|
||
|
redirect: '/'
|
||
|
},
|
||
|
{
|
||
|
path: '/',
|
||
|
name: 'WebsiteManagement',
|
||
|
component: WebsiteManagement
|
||
|
},
|
||
|
{
|
||
|
path: 'WebsiteManagement',
|
||
|
name: 'WebsiteManagement',
|
||
|
component: WebsiteManagement
|
||
|
},
|
||
|
|
||
|
]
|
||
|
})
|
||
|
|
||
|
router.beforeResolve((to, from, next) => {
|
||
|
if (to.name && router.app.$children[0] != undefined)
|
||
|
router.app.$children[0].loadingVisible = true;
|
||
|
|
||
|
setTimeout(() => {
|
||
|
next();
|
||
|
}, 500)
|
||
|
})
|
||
|
|
||
|
router.afterEach(() => {
|
||
|
if (router.app.$children[0] != undefined)
|
||
|
router.app.$children[0].loadingVisible = false;
|
||
|
})
|
||
|
|
||
|
export default router;
|