Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
45ee4116
authored
May 19, 2023
by
xingyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: echart
parent
2bd750a3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
10 deletions
+9
-10
src/components/Echart/src/Echart.vue
+1
-1
src/plugins/echarts/index.ts
+7
-3
src/views/infra/redis/index.vue
+1
-6
No files found.
src/components/Echart/src/Echart.vue
View file @
45ee4116
...
@@ -27,7 +27,7 @@ const props = defineProps({
...
@@ -27,7 +27,7 @@ const props = defineProps({
const
isDark
=
computed
(()
=>
appStore
.
getIsDark
)
const
isDark
=
computed
(()
=>
appStore
.
getIsDark
)
const
theme
=
computed
(()
=>
{
const
theme
=
computed
(()
=>
{
const
echartTheme
:
boolean
|
string
=
unref
(
isDark
)
?
true
:
'
auto
'
const
echartTheme
:
boolean
|
string
=
unref
(
isDark
)
?
true
:
'
inherit
'
return
echartTheme
return
echartTheme
})
})
...
...
src/plugins/echarts/index.ts
View file @
45ee4116
...
@@ -6,7 +6,8 @@ import {
...
@@ -6,7 +6,8 @@ import {
PieChart
,
PieChart
,
MapChart
,
MapChart
,
PictorialBarChart
,
PictorialBarChart
,
RadarChart
RadarChart
,
GaugeChart
}
from
'echarts/charts'
}
from
'echarts/charts'
import
{
import
{
...
@@ -16,7 +17,8 @@ import {
...
@@ -16,7 +17,8 @@ import {
PolarComponent
,
PolarComponent
,
AriaComponent
,
AriaComponent
,
ParallelComponent
,
ParallelComponent
,
LegendComponent
LegendComponent
,
ToolboxComponent
}
from
'echarts/components'
}
from
'echarts/components'
import
{
CanvasRenderer
}
from
'echarts/renderers'
import
{
CanvasRenderer
}
from
'echarts/renderers'
...
@@ -25,6 +27,7 @@ echarts.use([
...
@@ -25,6 +27,7 @@ echarts.use([
LegendComponent
,
LegendComponent
,
TitleComponent
,
TitleComponent
,
TooltipComponent
,
TooltipComponent
,
ToolboxComponent
,
GridComponent
,
GridComponent
,
PolarComponent
,
PolarComponent
,
AriaComponent
,
AriaComponent
,
...
@@ -35,7 +38,8 @@ echarts.use([
...
@@ -35,7 +38,8 @@ echarts.use([
MapChart
,
MapChart
,
CanvasRenderer
,
CanvasRenderer
,
PictorialBarChart
,
PictorialBarChart
,
RadarChart
RadarChart
,
GaugeChart
])
])
export
default
echarts
export
default
echarts
src/views/infra/redis/index.vue
View file @
45ee4116
...
@@ -63,9 +63,6 @@
...
@@ -63,9 +63,6 @@
</el-scrollbar>
</el-scrollbar>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
echarts
from
'@/plugins/echarts'
import
{
GaugeChart
}
from
'echarts/charts'
import
{
ToolboxComponent
}
from
'echarts/components'
import
*
as
RedisApi
from
'@/api/infra/redis'
import
*
as
RedisApi
from
'@/api/infra/redis'
import
{
RedisMonitorInfoVO
}
from
'@/api/infra/redis/types'
import
{
RedisMonitorInfoVO
}
from
'@/api/infra/redis/types'
const
cache
=
ref
<
RedisMonitorInfoVO
>
()
const
cache
=
ref
<
RedisMonitorInfoVO
>
()
...
@@ -77,7 +74,7 @@ const readRedisInfo = async () => {
...
@@ -77,7 +74,7 @@ const readRedisInfo = async () => {
}
}
// 内存使用情况
// 内存使用情况
const
usedmemoryEchartChika
=
reactive
({
const
usedmemoryEchartChika
=
reactive
<
any
>
({
title
:
{
title
:
{
// 仪表盘标题。
// 仪表盘标题。
text
:
'内存使用情况'
,
text
:
'内存使用情况'
,
...
@@ -263,8 +260,6 @@ const usedMemoryInstance = async () => {
...
@@ -263,8 +260,6 @@ const usedMemoryInstance = async () => {
/** 初始化 **/
/** 初始化 **/
onMounted
(()
=>
{
onMounted
(()
=>
{
echarts
.
use
([
ToolboxComponent
])
echarts
.
use
([
GaugeChart
])
// 读取 redis 信息
// 读取 redis 信息
readRedisInfo
()
readRedisInfo
()
// 加载数据
// 加载数据
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment