system.js 1.29 KB
import Layout from '@/layout'

const systemRouter = {
  path: '/system',
  component: Layout,
  redirect: '/system/page',
  alwaysShow: true, // will always show the root menu
  name: 'System',
  meta: {
    title: 'systems.systems',
    icon: 'component',
    roles: ['admin', 'assistant'] // you can set roles in root nav
  },
  children: [{
    path: 'systempage2',
    component: () => import('@/views/example/list'),
    name: 'SystemList1',
    meta: {
      title: 'systems.sites',
      roles: ['admin', 'assistant'] // or you can only set roles in sub nav
    }
  },
  {
    path: 'sytempage2',
    component: () => import('@/views/example/list'),
    name: 'SystemList2',
    meta: {
      title: 'systems.money',
      roles: ['admin', 'assistant'] // or you can only set roles in sub nav
    }
  },
  {
    path: 'systempage3',
    component: () => import('@/views/example/list'),
    name: 'SystemList3',
    meta: {
      title: 'systems.industry',
      roles: ['admin', 'assistant'] // or you can only set roles in sub nav
    }
  },
  {
    path: 'systempage4',
    component: () => import('@/views/example/list'),
    name: 'SystemList4',
    meta: {
      title: 'systems.template',
      roles: ['admin', 'assistant'] // or you can only set roles in sub nav
    }
  }

  ]
}

export default systemRouter