diff --git a/src/icons/svg/nested.svg b/src/icons/svg/nested.svg
new file mode 100644
index 00000000..f5641979
--- /dev/null
+++ b/src/icons/svg/nested.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/lang/en.js b/src/lang/en.js
index a7b1fa00..eed6fdd3 100644
--- a/src/lang/en.js
+++ b/src/lang/en.js
@@ -28,6 +28,10 @@ export default {
lineChart: 'Line Chart',
mixChart: 'Mix Chart',
example: 'Example',
+ nested: 'Nested Routes',
+ bar: 'Bar',
+ barProfile: 'Profile',
+ barPosts: 'Posts',
Table: 'Table',
dynamicTable: 'Dynamic Table',
dragTable: 'Drag Table',
diff --git a/src/lang/zh.js b/src/lang/zh.js
index 2b081331..0c16dee8 100644
--- a/src/lang/zh.js
+++ b/src/lang/zh.js
@@ -28,6 +28,10 @@ export default {
lineChart: '折线图',
mixChart: '混合图表',
example: '综合实例',
+ nested: '路由嵌套',
+ bar: 'Bar',
+ barProfile: 'Profile',
+ barPosts: 'Posts',
Table: 'Table',
dynamicTable: '动态Table',
dragTable: '拖拽Table',
diff --git a/src/router/index.js b/src/router/index.js
index cf3020cb..2c9dbcbd 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -199,6 +199,39 @@ export const asyncRouterMap = [
]
},
+ {
+ path: '/nested',
+ component: Layout,
+ redirect: '/nested/bar/profile',
+ name: 'nested',
+ meta: {
+ title: 'nested',
+ icon: 'nested'
+ },
+ children: [
+ {
+ path: '/nested/bar', // Must write the full path
+ component: () => import('@/views/nested/bar/index'), // Parent router-view
+ name: 'bar',
+ meta: { title: 'bar' },
+ children: [
+ {
+ path: 'profile',
+ component: () => import('@/views/nested/bar/profile'),
+ name: 'bar-profile',
+ meta: { title: 'barProfile' }
+ },
+ {
+ path: 'posts',
+ component: () => import('@/views/nested/bar/posts'),
+ name: 'bar-posts',
+ meta: { title: 'barPosts' }
+ }
+ ]
+ }
+ ]
+ },
+
{
path: '/error',
component: Layout,
diff --git a/src/views/nested/bar/index.vue b/src/views/nested/bar/index.vue
new file mode 100644
index 00000000..020a85c9
--- /dev/null
+++ b/src/views/nested/bar/index.vue
@@ -0,0 +1,7 @@
+
+
+
Parent View: Bar
+
+
+
+
diff --git a/src/views/nested/bar/posts.vue b/src/views/nested/bar/posts.vue
new file mode 100644
index 00000000..be3ca256
--- /dev/null
+++ b/src/views/nested/bar/posts.vue
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/src/views/nested/bar/profile.vue b/src/views/nested/bar/profile.vue
new file mode 100644
index 00000000..fe444cb1
--- /dev/null
+++ b/src/views/nested/bar/profile.vue
@@ -0,0 +1,6 @@
+
+
+
+
+
+