/** 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: '用户管理', component: () => import('@/views/users/list'), name: '用户管理', query: { test: 'ssssss' }, meta: { title: '用户管理', roles: ['admin'] // or you can only set roles in sub nav } } ] } export default chartsRouter