diff --git a/src/assets/icons/echarts.svg b/src/assets/icons/echarts.svg
new file mode 100644
index 00000000..efa65f45
--- /dev/null
+++ b/src/assets/icons/echarts.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/hooks/web/useECharts.ts b/src/hooks/web/useECharts.ts
index 9e034988..c795e215 100644
--- a/src/hooks/web/useECharts.ts
+++ b/src/hooks/web/useECharts.ts
@@ -4,6 +4,8 @@ import { useDebounceFn, tryOnUnmounted } from '@vueuse/core';
import echarts from '@/utils/plugin/echarts';
import { useEventListener } from '@/hooks/event/useEventListener';
+export type createEChartsOption = EChartsOption;
+
export function useECharts(elRef: Ref) {
let chartInstance: echarts.ECharts | null = null;
const cacheOptions = ref({}) as Ref;
diff --git a/src/layouts/pageLayouts/components/Sidebar/SidebarItem.vue b/src/layouts/pageLayouts/components/Sidebar/SidebarItem.vue
index 1f516bea..9ff890a0 100644
--- a/src/layouts/pageLayouts/components/Sidebar/SidebarItem.vue
+++ b/src/layouts/pageLayouts/components/Sidebar/SidebarItem.vue
@@ -100,7 +100,6 @@
if (isExternal(props.basePath)) {
return props.basePath;
}
- console.log(`${props.basePath} ${routePath}`);
return `${props.basePath}${routePath ? '/' + routePath : routePath}`;
};
diff --git a/src/locales/en/modules/route.ts b/src/locales/en/modules/route.ts
index 169ca35f..f553d825 100644
--- a/src/locales/en/modules/route.ts
+++ b/src/locales/en/modules/route.ts
@@ -6,6 +6,9 @@ const route = {
countTo: 'DigitalAnimation',
form: 'Form',
seamlessScroll: 'SeamlessScroll',
+ echarts: 'Echarts',
+ echarts_bar: 'Bar',
+ echarts_line: 'Line',
userInfo: 'UserInfo',
userList: 'UserList',
userDateil: 'UserDateil',
diff --git a/src/locales/zh-ch/modules/route.ts b/src/locales/zh-ch/modules/route.ts
index 0a1ce34c..d829a909 100644
--- a/src/locales/zh-ch/modules/route.ts
+++ b/src/locales/zh-ch/modules/route.ts
@@ -6,6 +6,9 @@ const route = {
countTo: '数字动画',
form: '表单',
seamlessScroll: '无限滚动',
+ echarts: '图表',
+ echarts_bar: '柱状图',
+ echarts_line: '折线图',
userInfo: '用户管理',
userList: '用户列表',
userDateil: '用户详情',
diff --git a/src/main.ts b/src/main.ts
index f68976ec..8f074ed0 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -7,7 +7,6 @@ import App from './App.vue';
// import 'virtual:windi-utilities.css'
// Register icon sprite
// import 'virtual:svg-icons-register'
-
import { configMainGlobalProperties, getServerConfig } from './utils';
import { configMainStore } from './store';
import { configMainI18n } from './locales';
diff --git a/src/router/modules/otherRoute/otherRoute.ts b/src/router/modules/otherRoute/otherRoute.ts
index 791abeb6..02bcd651 100644
--- a/src/router/modules/otherRoute/otherRoute.ts
+++ b/src/router/modules/otherRoute/otherRoute.ts
@@ -58,6 +58,28 @@ const safeManagerRoutes: Array = [
},
],
},
+ {
+ path: '/echarts',
+ component: Layout,
+ redirect: '/echarts/bar/',
+ name: 'echarts',
+ alwaysShow: true,
+ meta: { title: t('route.pathName.echarts'), icon: 'echarts' },
+ children: [
+ {
+ path: 'bar',
+ name: 'RtBar',
+ component: () => import('@/views/echarts/bar/index.vue'),
+ meta: { title: t('route.pathName.echarts_bar') },
+ },
+ {
+ path: 'line',
+ name: 'RtLine',
+ component: () => import('@/views/echarts/line/index.vue'),
+ meta: { title: t('route.pathName.echarts_line') },
+ },
+ ],
+ },
{
path: '/useradmin',
component: Layout,
diff --git a/src/utils/plugin/echarts.ts b/src/utils/plugin/echarts.ts
index 43fad803..609b1d3d 100644
--- a/src/utils/plugin/echarts.ts
+++ b/src/utils/plugin/echarts.ts
@@ -6,7 +6,7 @@ import {
ToolboxComponent,
LegendComponent,
} from 'echarts/components';
-import { LineChart } from 'echarts/charts';
+import { LineChart, BarChart } from 'echarts/charts';
import { UniversalTransition } from 'echarts/features';
import { CanvasRenderer } from 'echarts/renderers';
@@ -19,6 +19,7 @@ echarts.use([
LegendComponent,
CanvasRenderer,
UniversalTransition,
+ BarChart,
]);
export default echarts;
diff --git a/src/views/echarts/bar/components/BarRace.vue b/src/views/echarts/bar/components/BarRace.vue
new file mode 100644
index 00000000..b27a80f4
--- /dev/null
+++ b/src/views/echarts/bar/components/BarRace.vue
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
diff --git a/src/views/echarts/bar/index.vue b/src/views/echarts/bar/index.vue
new file mode 100644
index 00000000..02b019fa
--- /dev/null
+++ b/src/views/echarts/bar/index.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/echarts/line/components/LineRace.vue b/src/views/echarts/line/components/LineRace.vue
new file mode 100644
index 00000000..001e9d23
--- /dev/null
+++ b/src/views/echarts/line/components/LineRace.vue
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
diff --git a/src/views/echarts/line/index.vue b/src/views/echarts/line/index.vue
new file mode 100644
index 00000000..14d47400
--- /dev/null
+++ b/src/views/echarts/line/index.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/useradmin/userlist/index.vue b/src/views/useradmin/userlist/index.vue
index 1204a87d..fe3ca9c2 100644
--- a/src/views/useradmin/userlist/index.vue
+++ b/src/views/useradmin/userlist/index.vue
@@ -2,7 +2,6 @@
听说这个是用户列表
-