diff --git a/src/icons/svg/nested.svg b/src/icons/svg/nested.svg new file mode 100644 index 0000000..f564197 --- /dev/null +++ b/src/icons/svg/nested.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 30b8872..694d3b3 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -72,6 +72,64 @@ export const constantRouterMap = [ ] }, + { + path: '/nested', + component: Layout, + redirect: '/nested/menu1', + name: 'nested', + meta: { + title: 'nested', + icon: 'nested' + }, + children: [ + { + path: 'menu1', + component: () => import('@/views/nested/menu1/index'), // Parent router-view + name: 'menu1', + meta: { title: 'menu1' }, + children: [ + { + path: 'menu1-1', + component: () => import('@/views/nested/menu1/menu1-1'), + name: 'menu1-1', + meta: { title: 'menu1-1' } + }, + { + path: 'menu1-2', + component: () => import('@/views/nested/menu1/menu1-2'), + name: 'menu1-2', + meta: { title: 'menu1-2' }, + children: [ + { + path: 'menu1-2-1', + component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'), + name: 'menu1-2-1', + meta: { title: 'menu1-2-1' } + }, + { + path: 'menu1-2-2', + component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'), + name: 'menu1-2-2', + meta: { title: 'menu1-2-2' } + } + ] + }, + { + path: 'menu1-3', + component: () => import('@/views/nested/menu1/menu1-3'), + name: 'menu1-3', + meta: { title: 'menu1-3' } + } + ] + }, + { + path: 'menu2', + component: () => import('@/views/nested/menu2/index'), + meta: { title: 'menu2' } + } + ] + }, + { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/views/layout/components/Sidebar/SidebarItem.vue b/src/views/layout/components/Sidebar/SidebarItem.vue index aa719d1..89fcff5 100644 --- a/src/views/layout/components/Sidebar/SidebarItem.vue +++ b/src/views/layout/components/Sidebar/SidebarItem.vue @@ -1,26 +1,24 @@