feat(chart): add useEcharts and useApexChart demo

This commit is contained in:
vben
2020-10-11 14:53:04 +08:00
parent e9536b5b7c
commit 21d0ed92df
20 changed files with 1241 additions and 23 deletions

View File

@@ -11,6 +11,7 @@ import iframeDemo from './modules/demo/iframe';
import compDemo from './modules/demo/comp';
import permissionDemo from './modules/demo/permission';
import featDemo from './modules/demo/feat';
import chartsDemo from './modules/demo/charts';
const routeModuleList: AppRouteModule[] = [
exceptionDemo,
@@ -19,6 +20,7 @@ const routeModuleList: AppRouteModule[] = [
compDemo,
featDemo,
permissionDemo,
chartsDemo,
];
export const asyncRoutes = [

View File

@@ -0,0 +1,60 @@
import type { AppRouteModule } from '/@/router/types';
import { PAGE_LAYOUT_COMPONENT } from '/@/router/constant';
export default {
layout: {
path: '/charts',
name: 'Charts',
component: PAGE_LAYOUT_COMPONENT,
redirect: '/charts/welcome',
meta: {
icon: 'ant-design:area-chart-outlined',
title: '图表库',
},
},
routes: [
{
path: '/echarts',
name: 'Echarts',
meta: {
title: 'Echarts',
},
children: [
{
path: 'map',
name: 'Map',
component: () => import('/@/views/demo/echarts/Map.vue'),
meta: {
title: '地图',
},
},
{
path: 'line',
name: 'Line',
component: () => import('/@/views/demo/echarts/Line.vue'),
meta: {
title: '折线图',
},
},
{
path: 'pie',
name: 'Pie',
component: () => import('/@/views/demo/echarts/Pie.vue'),
meta: {
title: '饼图',
},
},
],
},
{
path: '/apexChart',
name: 'ApexChart',
meta: {
title: 'ApexChart',
},
component: () => import('/@/views/demo/echarts/apex/index.vue'),
},
],
} as AppRouteModule;