From 9b1be08fc6fabfbe92d5ef14e3d4f4c73e51c7f6 Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Sat, 9 Jun 2018 20:00:01 +0800 Subject: [PATCH] no message Former-commit-id: b246e06820042d5f145172f16cfe18e69627a9e2 Former-commit-id: 158136e0584bf7e629f180becbae797520184f4b Former-commit-id: 9b9f374a2db074133d1d7c2d66e3a8fe6b137f68 --- src/menu/index.js | 25 ++++++++++++++++++++++--- src/router/index.js | 26 +++++++++++++++++++++++--- 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/src/menu/index.js b/src/menu/index.js index e6feab07..54ace6da 100644 --- a/src/menu/index.js +++ b/src/menu/index.js @@ -11,7 +11,7 @@ export default [ path: '/demo/plugins', title: '插件', icon: 'plug', - children: ((pre) => [ + children: (pre => [ { path: `${pre}index`, title: '插件首页' }, { path: `${pre}mock`, @@ -56,7 +56,7 @@ export default [ path: '/demo/components', title: '组件', icon: 'puzzle-piece', - children: ((pre) => [ + children: (pre => [ { path: `${pre}index`, title: '组件首页' }, { path: `${pre}container`, @@ -95,7 +95,26 @@ export default [ { path: '/demo/chart', title: '图表', - icon: 'pie-chart' + icon: 'pie-chart', + children: (pre => [ + { path: `${pre}index`, title: '图表首页' }, + { + path: `${pre}demo`, + title: '单图示例', + children: [ + { path: `${pre}demo/areaBase`, title: '区域折线图' }, + { path: `${pre}demo/barBase`, title: '条形图' }, + { path: `${pre}demo/columnBase`, title: '柱形图' }, + { path: `${pre}demo/lineBase`, title: '折线图' }, + { path: `${pre}demo/lineStep`, title: '阶梯折线图' }, + { path: `${pre}demo/nightingaleRoseBase`, title: '南丁格尔玫瑰图' }, + { path: `${pre}demo/PieBase`, title: '饼图' }, + { path: `${pre}demo/radarBase`, title: '雷达图' } + ] + }, + { path: `${pre}all`, title: '示例' }, + { path: `${pre}dynamicSize`, title: '动态尺寸与可拖拽' } + ])('/demo/chart/') } ] }, diff --git a/src/router/index.js b/src/router/index.js index b59f112d..4fbfdf79 100755 --- a/src/router/index.js +++ b/src/router/index.js @@ -25,7 +25,7 @@ const routes = [ meta: { requiresAuth: true }, redirect: { name: 'demo-components-index' }, component: () => import('@/components/core/MainLayout/index.vue'), - children: ((pre) => [ + children: (pre => [ { path: 'container/full', name: `${pre}container-full`, component: () => import('@/pages/demo/components/container/full.vue') }, { path: 'container/ghost', name: `${pre}container-ghost`, component: () => import('@/pages/demo/components/container/ghost.vue') }, { path: 'container/normal', name: `${pre}container-normal`, component: () => import('@/pages/demo/components/container/normal.vue') }, @@ -49,7 +49,7 @@ const routes = [ meta: { requiresAuth: true }, redirect: { name: 'demo-plugins-index' }, component: () => import('@/components/core/MainLayout/index.vue'), - children: ((pre) => [ + children: (pre => [ { path: 'build', name: `${pre}build`, component: () => import('@/pages/demo/plugins/build/index.vue') }, { path: 'clipboard-polyfill', name: `${pre}clipboard-polyfill`, component: () => import('@/pages/demo/plugins/clipboard-polyfill/index.vue') }, { path: 'export/table', name: `${pre}export-table`, component: () => import('@/pages/demo/plugins/export/table.vue') }, @@ -66,6 +66,26 @@ const routes = [ { path: 'timeago', name: `${pre}timeago`, component: () => import('@/pages/demo/plugins/timeago/index.vue') } ])('demo-plugins-') }, + { + path: '/demo/chart', + name: 'demo-chart', + meta: { requiresAuth: true }, + redirect: { name: 'demo-chart-index' }, + component: () => import('@/components/core/MainLayout/index.vue'), + children: (pre => [ + { path: 'all', name: `${pre}all`, component: () => import('@/pages/demo/chart/all/index.vue') }, + { path: 'demo/areaBase', name: `${pre}demo-areaBase`, component: () => import('@/pages/demo/chart/demo/areaBase.vue') }, + { path: 'demo/barBase', name: `${pre}demo-barBase`, component: () => import('@/pages/demo/chart/demo/barBase.vue') }, + { path: 'demo/columnBase', name: `${pre}demo-columnBase`, component: () => import('@/pages/demo/chart/demo/columnBase.vue') }, + { path: 'demo/lineBase', name: `${pre}demo-lineBase`, component: () => import('@/pages/demo/chart/demo/lineBase.vue') }, + { path: 'demo/lineStep', name: `${pre}demo-lineStep`, component: () => import('@/pages/demo/chart/demo/lineStep.vue') }, + { path: 'demo/nightingaleRoseBase', name: `${pre}demo-nightingaleRoseBase`, component: () => import('@/pages/demo/chart/demo/nightingaleRoseBase.vue') }, + { path: 'demo/PieBase', name: `${pre}demo-PieBase`, component: () => import('@/pages/demo/chart/demo/PieBase.vue') }, + { path: 'demo/radarBase', name: `${pre}demo-radarBase`, component: () => import('@/pages/demo/chart/demo/radarBase.vue') }, + { path: 'dynamicSize', name: `${pre}dynamicSize`, component: () => import('@/pages/demo/chart/dynamicSize/index.vue') }, + { path: 'index', name: `${pre}index`, component: () => import('@/pages/demo/chart/index/index.vue') } + ])('demo-chart-') + }, // 登陆 { path: '/login', @@ -74,7 +94,7 @@ const routes = [ } ] -routes[1].children.forEach(e => { +routes[3].children.forEach(e => { console.log(`{ path: \`\${pre}${e.path}\`, title: 'title' }`) })