From afec346d6491a970264be03abd82ebdfc640893b Mon Sep 17 00:00:00 2001 From: xingyuv Date: Thu, 23 Mar 2023 17:22:43 +0800 Subject: [PATCH] feat: redis echarts --- src/utils/lib/echarts.ts | 3 ++- src/views/infra/redis/components/Memory.vue | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/lib/echarts.ts b/src/utils/lib/echarts.ts index 61f9f593..85a58579 100644 --- a/src/utils/lib/echarts.ts +++ b/src/utils/lib/echarts.ts @@ -1,6 +1,6 @@ import * as echarts from 'echarts/core' -import { BarChart, LineChart, PieChart, MapChart, PictorialBarChart, RadarChart, ScatterChart } from 'echarts/charts' +import { BarChart, GaugeChart, LineChart, PieChart, MapChart, PictorialBarChart, RadarChart, ScatterChart } from 'echarts/charts' import { TitleComponent, @@ -30,6 +30,7 @@ echarts.use([ AriaComponent, ParallelComponent, BarChart, + GaugeChart, LineChart, PieChart, MapChart, diff --git a/src/views/infra/redis/components/Memory.vue b/src/views/infra/redis/components/Memory.vue index b436a304..32a481e0 100644 --- a/src/views/infra/redis/components/Memory.vue +++ b/src/views/infra/redis/components/Memory.vue @@ -11,7 +11,7 @@ import { propTypes } from '@/utils/propTypes' const props = defineProps({ loading: Boolean, - cacheInfo: propTypes.object, + cacheInfo: Object, width: propTypes.string.def('100%'), height: propTypes.string.def('300px') }) @@ -36,7 +36,7 @@ watch( name: '峰值', type: 'gauge', min: 0, - max: 1000, + max: 100, detail: { formatter: optionsData.value.used_memory_human },