/** When your routing table is too long, you can split it into small modules**/ import Layout from '@/layout' const chartsRouter = { path: '/users', component: Layout, redirect: '/users/page', alwaysShow: true, // will always show the root menu name: 'Users', meta: { title: 'users', icon: 'peoples', roles: ['admin', 'assistant'] // you can set roles in root nav }, children: [{ path: 'page', component: () => import('@/views/users/list'), name: 'UserList', meta: { title: 'UserList', roles: ['admin', 'assistant', 'shoper', 'runner'] // or you can only set roles in sub nav } } // ,{ // path: '/icons', // component: () => import('@/views/icons/index'), // name: 'icons', // meta: { // title: 'icons', // roles: ['admin', 'assistant', 'shoper', 'runner'] // or you can only set roles in sub nav // } // } ] } export default chartsRouter