From 11215577454da9062ec997d9dda4ce34d86c17ca Mon Sep 17 00:00:00 2001 From: Bowen Date: Wed, 26 Sep 2018 12:36:45 +0800 Subject: [PATCH] fix: remove redundant nested routes --- src/components/MainWrapper.vue | 18 ----------------- src/router/components.js | 9 ++++----- src/router/routes.js | 36 ++++++++++++---------------------- src/view/App.vue | 8 ++++++-- 4 files changed, 22 insertions(+), 49 deletions(-) delete mode 100644 src/components/MainWrapper.vue diff --git a/src/components/MainWrapper.vue b/src/components/MainWrapper.vue deleted file mode 100644 index 19a8150..0000000 --- a/src/components/MainWrapper.vue +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/src/router/components.js b/src/router/components.js index 1e5db5f..2905da1 100644 --- a/src/router/components.js +++ b/src/router/components.js @@ -1,7 +1,6 @@ export default { - wrapper: () => import(/* webpackChunkName: 'wrapper' */ 'COMPONENTS/MainWrapper'), - analysis: () => import(/* webpackChunkName: 'dashboard' */ 'VIEW/Analysis'), - monitor: () => import(/* webpackChunkName: 'dashboard' */ 'VIEW/Monitor'), - workspace: () => import(/* webpackChunkName: 'dashboard' */ 'VIEW/Workspace'), - basicForm: () => import(/* webpackChunkName: 'form' */ 'VIEW/BasicForm') + analysis: () => import(/* webpackChunkName: 'analysis' */ 'VIEW/Analysis'), + monitor: () => import(/* webpackChunkName: 'monitor' */ 'VIEW/Monitor'), + workspace: () => import(/* webpackChunkName: 'workspace' */ 'VIEW/Workspace'), + basicForm: () => import(/* webpackChunkName: 'basic-form' */ 'VIEW/BasicForm') } diff --git a/src/router/routes.js b/src/router/routes.js index c3bd8e9..8a9a5e4 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -6,31 +6,19 @@ export default [ redirect: '/dashboard/analysis' }, { - path: '/dashboard', - component: components.wrapper, - children: [ - { - path: 'analysis', - component: components.analysis - }, - { - path: 'monitor', - component: components.monitor - }, - { - path: 'workspace', - component: components.workspace - } - ] + path: '/dashboard/analysis', + component: components.analysis }, { - path: '/form', - component: components.wrapper, - children: [ - { - path: 'basic-form', - component: components.basicForm - } - ] + path: '/dashboard/monitor', + component: components.monitor + }, + { + path: '/dashboard/workspace', + component: components.workspace + }, + { + path: '/form/basic-form', + component: components.basicForm } ] diff --git a/src/view/App.vue b/src/view/App.vue index c01d478..d3061fd 100644 --- a/src/view/App.vue +++ b/src/view/App.vue @@ -3,8 +3,8 @@ - - + + @@ -74,4 +74,8 @@ export default { &:hover color: #3273dc +.main__wrapper + min-height: calc(100vh - 60px - 100px) + padding: 24px 24px 0 24px + background-color: #f0f2f5