diff --git a/src/router/index.js b/src/router/index.js index 4615c6e..83d38de 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,6 +2,8 @@ import { createRouter, createWebHistory } from 'vue-router'; import error from './modules/error'; import results from './modules/results'; import other from './modules/other'; +import charts from './modules/charts'; + import { name } from '../../package.json'; // 默认布局 const DefaultLayout = () => import('../layouts/DefaultLayout.vue'); @@ -37,6 +39,7 @@ const routes = [ }, component: import('../pages/loginPage.vue'), }, + ...charts, ...results, ...other, ...error, diff --git a/src/router/modules/charts.js b/src/router/modules/charts.js index e69de29..d6e33f8 100644 --- a/src/router/modules/charts.js +++ b/src/router/modules/charts.js @@ -0,0 +1,58 @@ +const DefaultLayout = () => import('@/layouts/DefaultLayout.vue'); +export default [ + { + path: '/charts', + component: DefaultLayout, + meta: { + title: '福录大全', + }, + children: [ + { + path: '/bar', + name: 'ChartBar', + component: () => import('@/pages/charts/ChartBar.vue'), + meta: { + title: '柱状图', + }, + }, + { + path: '/line', + name: 'ChartLine', + component: () => import('@/pages/charts/ChartLine.vue'), + meta: { + title: '折线图', + }, + }, + { + path: '/pie', + name: 'ChartPie', + component: () => import('@/pages/charts/ChartPie.vue'), + meta: { + title: '饼图', + }, + }, + { + path: '/dataset', + name: 'ChartDataset', + component: () => import('@/pages/charts/ChartDataset.vue'), + meta: { + title: '数据集', + }, + },{ + path:'/radar', + name:'ChartRadar', + component:()=>import('@/pages/charts/ChartRadar.vue'), + meta:{ + title:'雷达图' + } + },{ + path:'/scatter', + name:'ChartScatter', + component:()=>import('@/pages/charts/ChartScatter.vue'), + meta:{ + title:'散点图' + } + } + ], + }, +];