From 4c0aba404731428d926a8201f29cc5eb1fc18ee3 Mon Sep 17 00:00:00 2001 From: FairyEver <1711467488@qq.com> Date: Thu, 25 Jul 2019 15:49:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E6=80=81=E5=A2=9E=E5=8A=A0=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E7=9A=84=E6=BC=94=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 09afa0275b79bac197f18abe19f5136f74a56a15 [formerly 09afa0275b79bac197f18abe19f5136f74a56a15 [formerly 09afa0275b79bac197f18abe19f5136f74a56a15 [formerly 09afa0275b79bac197f18abe19f5136f74a56a15 [formerly 56ed017756f203a99f6f8214886d8c42bf6e7c45 [formerly 1ee3dca2bd17cf0cdd50d0ae1b2d72b643c5c13b]]]]] Former-commit-id: 162b2efa6c1f40d2f82a60e6d46ca83f341b6e47 Former-commit-id: 63edc60bdf591ee34689102938c850596762ddf3 Former-commit-id: 524ace56fa7e3c219b0e317f57eacdb8819d5d8e [formerly 68e8b0adba042d31c389a5c477763af9f4c94d1a] Former-commit-id: 20da1e8d1891bd4089b230f935260e88071c90e6 Former-commit-id: c978394b78ed728429205110b1b89be2651a42ab Former-commit-id: 3ef346993eae5c049a866793ac015b19148d3e57 Former-commit-id: 1537e533b448fee2f0d94160e344b3515c0f4c3a Former-commit-id: cdb3d246e64e1fd684beaf50981bfde7138de903 --- src/menu/modules/demo-playground.js | 8 ++ src/router/modules/playground.js | 1 + .../playground/add-routes/alternates/1.vue | 5 + .../playground/add-routes/alternates/2.vue | 5 + .../playground/add-routes/alternates/3.vue | 5 + .../demo/playground/add-routes/routes.vue | 110 ++++++++++++++++++ 6 files changed, 134 insertions(+) create mode 100644 src/views/demo/playground/add-routes/alternates/1.vue create mode 100644 src/views/demo/playground/add-routes/alternates/2.vue create mode 100644 src/views/demo/playground/add-routes/alternates/3.vue create mode 100644 src/views/demo/playground/add-routes/routes.vue diff --git a/src/menu/modules/demo-playground.js b/src/menu/modules/demo-playground.js index c5957a2c..dcaaf04a 100644 --- a/src/menu/modules/demo-playground.js +++ b/src/menu/modules/demo-playground.js @@ -97,6 +97,14 @@ export default { { path: `${pre}log/console`, title: '控制台日志', icon: 'lightbulb-o' } ] }, + { + path: `${pre}add-routes`, + title: '动态添加路由', + icon: 'plus-square', + children: [ + { path: `${pre}add-routes/routes`, title: '添加页面', icon: 'file-o' } + ] + }, { path: `${pre}env`, title: '环境信息', icon: 'exclamation-circle' } ])('/demo/playground/') } diff --git a/src/router/modules/playground.js b/src/router/modules/playground.js index c6eb445a..a0b97247 100644 --- a/src/router/modules/playground.js +++ b/src/router/modules/playground.js @@ -37,6 +37,7 @@ export default { { path: 'log/console', name: `${pre}log-console`, component: _import('demo/playground/log/console'), meta: { ...meta, title: '控制台日志' } }, { path: 'log/error', name: `${pre}log-error`, component: _import('demo/playground/log/error'), meta: { ...meta, title: '错误捕捉' } }, { path: 'log/log', name: `${pre}log-log`, component: _import('demo/playground/log/log'), meta: { ...meta, title: '日志记录' } }, + { path: 'add-routes/routes', name: `${pre}add-routes-routes`, component: _import('demo/playground/add-routes/routes'), meta: { ...meta, title: '添加页面' } }, { path: 'env', name: `${pre}env`, component: _import('demo/playground/env'), meta: { ...meta, title: '环境信息' } } ])('demo-playground-') } diff --git a/src/views/demo/playground/add-routes/alternates/1.vue b/src/views/demo/playground/add-routes/alternates/1.vue new file mode 100644 index 00000000..86734738 --- /dev/null +++ b/src/views/demo/playground/add-routes/alternates/1.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/src/views/demo/playground/add-routes/alternates/2.vue b/src/views/demo/playground/add-routes/alternates/2.vue new file mode 100644 index 00000000..5f5def8c --- /dev/null +++ b/src/views/demo/playground/add-routes/alternates/2.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/src/views/demo/playground/add-routes/alternates/3.vue b/src/views/demo/playground/add-routes/alternates/3.vue new file mode 100644 index 00000000..190a87a0 --- /dev/null +++ b/src/views/demo/playground/add-routes/alternates/3.vue @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/src/views/demo/playground/add-routes/routes.vue b/src/views/demo/playground/add-routes/routes.vue new file mode 100644 index 00000000..b3e7195d --- /dev/null +++ b/src/views/demo/playground/add-routes/routes.vue @@ -0,0 +1,110 @@ + + +