/** 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.people', icon: 'peoples', roles: ['admin', 'assistant'] // you can set roles in root nav }, children: [{ path: 'assistant', component: () => import('@/views/users/list'), name: 'assistant', query: { test: 'ssssss' }, meta: { title: 'users.assistant', roles: ['admin'] // or you can only set roles in sub nav } }, { path: 'runner', component: () => import('@/views/users/list'), name: 'runner', query: { test: 'ssssss' }, meta: { title: 'users.runner', roles: ['admin', 'assistant'] // or you can only set roles in sub nav } }, { path: 'shoper', component: () => import('@/views/users/list'), name: 'shoper', query: { test: 'ssssss' }, meta: { title: 'users.shoper', roles: ['admin', 'assistant'] // or you can only set roles in sub nav } }, { path: 'users', component: () => import('@/views/users/list'), name: 'users', query: { test: 'ssssss' }, meta: { title: 'users.user', roles: ['admin', 'assistant'] // 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