File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ const props = defineProps({
27
27
const isDark = computed (() => appStore .getIsDark )
28
28
29
29
const theme = computed (() => {
30
- const echartTheme: boolean | string = unref (isDark ) ? true : ' auto '
30
+ const echartTheme: boolean | string = unref (isDark ) ? true : ' inherit '
31
31
32
32
return echartTheme
33
33
})
Original file line number Diff line number Diff line change 6
6
PieChart ,
7
7
MapChart ,
8
8
PictorialBarChart ,
9
- RadarChart
9
+ RadarChart ,
10
+ GaugeChart
10
11
} from 'echarts/charts'
11
12
12
13
import {
@@ -16,7 +17,8 @@ import {
16
17
PolarComponent ,
17
18
AriaComponent ,
18
19
ParallelComponent ,
19
- LegendComponent
20
+ LegendComponent ,
21
+ ToolboxComponent
20
22
} from 'echarts/components'
21
23
22
24
import { CanvasRenderer } from 'echarts/renderers'
@@ -25,6 +27,7 @@ echarts.use([
25
27
LegendComponent ,
26
28
TitleComponent ,
27
29
TooltipComponent ,
30
+ ToolboxComponent ,
28
31
GridComponent ,
29
32
PolarComponent ,
30
33
AriaComponent ,
@@ -35,7 +38,8 @@ echarts.use([
35
38
MapChart ,
36
39
CanvasRenderer ,
37
40
PictorialBarChart ,
38
- RadarChart
41
+ RadarChart ,
42
+ GaugeChart
39
43
] )
40
44
41
45
export default echarts
Original file line number Diff line number Diff line change 63
63
</el-scrollbar >
64
64
</template >
65
65
<script setup lang="ts">
66
- import echarts from ' @/plugins/echarts'
67
- import { GaugeChart } from ' echarts/charts'
68
- import { ToolboxComponent } from ' echarts/components'
69
66
import * as RedisApi from ' @/api/infra/redis'
70
67
import { RedisMonitorInfoVO } from ' @/api/infra/redis/types'
71
68
const cache = ref <RedisMonitorInfoVO >()
@@ -77,7 +74,7 @@ const readRedisInfo = async () => {
77
74
}
78
75
79
76
// 内存使用情况
80
- const usedmemoryEchartChika = reactive ({
77
+ const usedmemoryEchartChika = reactive < any > ({
81
78
title: {
82
79
// 仪表盘标题。
83
80
text: ' 内存使用情况' ,
@@ -263,8 +260,6 @@ const usedMemoryInstance = async () => {
263
260
264
261
/** 初始化 **/
265
262
onMounted (() => {
266
- echarts .use ([ToolboxComponent ])
267
- echarts .use ([GaugeChart ])
268
263
// 读取 redis 信息
269
264
readRedisInfo ()
270
265
// 加载数据
You can’t perform that action at this time.
0 commit comments