Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Vue from 'vue'
- import Router from 'vue-router'
- const routerOptions = [
- { path: '/', component: 'Dashboard', name: 'Dashboard', icon: 'web' },
- { path: '/ToDo', component: 'ToDo', name: 'ToDo', icon: 'view_list' },
- { path: '/Portfolios', component: 'Portfolios', name: 'Portfolios', icon: 'pie_chart',
- children: [
- { path: ':key', component: 'Portfolio', name: 'Portfolio',
- children: [
- { path: '', component: 'Dashboard', name: 'Dashboard' },
- { path: 'projects', component: 'Projects', name: 'Projects' },
- { path: 'issues', component: 'Issues', name: 'Issues & Changes' },
- { path: 'risks', component: 'Risks', name: 'Risks' },
- { path: 'financials', component: 'Financials', name: 'Financials' }
- ]}
- ]},
- { path: '/Projects', component: 'Projects', name: 'Projects', icon: 'widgets',
- children: [
- { path: ':key', component: 'Project', name: 'Project',
- children: [
- { path: '', component: 'Dashboard', name: 'Dashboard' },
- { path: 'issues', component: 'Issues', name: 'Issues & Changes' },
- { path: 'risks', component: 'Risks', name: 'Risks' },
- { path: 'financials', component: 'Financials', name: 'Financials' }
- ]}
- ]},
- ]
- const routes = routerOptions.map(route => {
- return {
- path: route.path,
- component: () => import(`@/components/05_pages/${route.component}/${route.component}.vue`),
- name: route.name,
- icon: route.icon
- }
- })
- Vue.use(Router)
- export default new Router({
- mode: 'history',
- routes
- })
Add Comment
Please, Sign In to add comment