Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
nse-ui
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
吴超
nse-ui
Commits
c6aabfe9
Commit
c6aabfe9
authored
Aug 26, 2025
by
周海峰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://code.palacesun.com/wuchao/nse-ui
parents
f4f5f2e0
a3381a28
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
200 行增加
和
491 行删除
+200
-491
src/views/indexManage/ItemManage/index.vue
+200
-192
src/views/indexManage/ItemManage/modules/DiskUsageChart.vue
+0
-178
src/views/indexManage/ItemManage/modules/rateChart.vue
+0
-121
没有找到文件。
src/views/indexManage/ItemManage/index.vue
View file @
c6aabfe9
<
script
setup
name=
"ProjectHome"
>
<
script
setup
name=
"Index"
>
import
{
ref
,
toRefs
,
reactive
,
getCurrentInstance
,
proxyRefs
,
onMounted
}
from
'vue'
import
{
onMounted
,
ref
,
reactive
}
from
'vue'
import
{
useDict
}
from
'@/utils/dict'
import
{
CountUp
}
from
'view-ui-plus'
;
import
{
changeRoute
}
from
'@/utils/switchRoute'
import
biao
from
'@/assets/images/project/biao.png'
import
jiamibiao
from
'@/assets/images/project/jiamibiao.png'
import
jiamiziduan
from
'@/assets/images/project/jiamiziduan.png'
import
shujuyuan
from
'@/assets/images/project/shujuyuan.png'
import
yingyong
from
'@/assets/images/project/yingyong.png'
import
ziduan
from
'@/assets/images/project/ziduan.png'
import
cpu
from
'@/assets/images/project/cpu.png'
import
neicun
from
'@/assets/images/project/neicun.png'
import
rateChart
from
'./modules/rateChart.vue'
import
DiskUsageChart
from
'./modules/DiskUsageChart.vue'
import
{
useRouter
}
from
'vue-router'
import
{
useRouter
}
from
'vue-router'
import
{
changeRoute
}
from
'@/utils/switchRoute'
import
img
from
'@/assets/images/index/index.js'
import
useAppStore
from
'@/store/modules/app'
import
HomeCharts
from
'@/components/HomeCharts/index.vue'
import
usePermissionStore
from
'@/store/modules/permission'
import
{
getHomePage
}
from
'@/api/home'
const
appStore
=
useAppStore
()
const
permissionStore
=
usePermissionStore
()
const
router
=
useRouter
()
const
router
=
useRouter
()
const
{
proxy
}
=
getCurrentInstance
()
const
{
proxy
}
=
getCurrentInstance
()
// const { eo_province, eo_city, eo_district, invoice_type, tax_rate, plan_type, invoice_status } = useDict('eo_province', 'eo_city', 'eo_district', 'invoice_type', 'tax_rate', 'plan_type', 'invoice_status')
const
detailLoading
=
ref
(
false
)
function
getInfo
()
{
detailLoading
.
value
=
true
// console.log(props.projectId)
setTimeout
(()
=>
{
detailLoading
.
value
=
false
},
3000
);
}
const
projectId
=
ref
(
''
)
const
projectId
=
ref
(
sessionStorage
.
getItem
(
'projectId'
))
// 项目id
// 首页统计数据
onMounted
(()
=>
{
const
topList
=
ref
([
projectId
.
value
=
proxy
.
$route
.
query
.
projectId
{
console
.
log
(
'projectId'
,
projectId
.
value
)
name
:
'数据源'
,
})
icon
:
img
.
icon2
,
// const props = defineProps({
num
:
0
,
// projectId: String, // 主键
unit
:
'个'
},
// })
{
name
:
'表'
,
const
stats
=
ref
([
icon
:
img
.
icon3
,
{
label
:
'应用'
,
value
:
1
,
url
:
yingyong
},
num
:
0
,
{
label
:
'数据源'
,
value
:
10
,
url
:
shujuyuan
},
unit
:
'个'
{
label
:
'表'
,
value
:
340
,
url
:
biao
},
},
{
label
:
'字段'
,
value
:
4043
,
url
:
ziduan
},
{
{
label
:
'加密表数量'
,
value
:
0
,
url
:
jiamibiao
},
name
:
'字段'
,
{
label
:
'加密字段数量'
,
value
:
0
,
url
:
jiamiziduan
}
icon
:
img
.
icon4
,
num
:
0
,
unit
:
'个'
},
{
name
:
'加密表数量'
,
icon
:
img
.
icon5
,
num
:
0
,
unit
:
'个'
},
{
name
:
'加密字段数量'
,
icon
:
img
.
icon6
,
num
:
0
,
unit
:
'个'
}
])
])
const
cpuData
=
reactive
({
// 系统资源数据
cpuUsage
:
0
,
const
dataObj
=
ref
({
value
:
8
cpuCount
:
0
,
percentCpuLoad
:
0
,
totalvirtualMemory
:
0
,
percentMemoryLoad
:
0
,
})
})
// 磁盘空间图表数据
const
neicunData
=
reactive
({
const
homeChartData
=
reactive
({
cpuUsage
:
77
,
xList
:
[],
value
:
16
yList1
:
[],
yList2
:
[],
})
})
provide
(
'homeChartData'
,
homeChartData
)
const
diskData
=
ref
([
// 获取首页数据
{
name
:
'/run/user/0'
,
total
:
100
,
used
:
10
},
const
getHomePageFunc
=
()
=>
{
{
name
:
'/boot/efi'
,
total
:
100
,
used
:
20
},
getHomePage
({
projectid
:
projectId
.
value
}).
then
(
res
=>
{
{
name
:
'/boot'
,
total
:
100
,
used
:
30
},
const
{
data
}
=
res
{
name
:
'/run/lock'
,
total
:
100
,
used
:
5
},
dataObj
.
value
=
data
{
name
:
'/dev/shm'
,
total
:
100
,
used
:
15
},
topList
.
value
[
0
].
num
=
data
.
dataBaseNum
{
name
:
'/'
,
total
:
100
,
used
:
90
},
topList
.
value
[
1
].
num
=
data
.
tableNum
{
name
:
'/run'
,
total
:
100
,
used
:
25
}
topList
.
value
[
2
].
num
=
data
.
fieldNum
])
topList
.
value
[
3
].
num
=
data
.
encryptTableCount
topList
.
value
[
4
].
num
=
data
.
encryptColumnCount
getInfo
()
if
(
!
data
.
space
)
return
homeChartData
.
xList
=
data
.
space
.
map
(
item
=>
item
.
path
)
homeChartData
.
yList1
=
data
.
space
.
map
(
item
=>
item
.
usedpace
)
homeChartData
.
yList2
=
data
.
space
.
map
(
item
=>
item
.
freespace
)
})
}
function
pageProjectManage
()
{
// 返回主页面
const
pageProjectManage
=
()
=>
{
changeRoute
()
changeRoute
()
router
.
push
({
router
.
push
({
path
:
'/project/Project'
path
:
'/project/Project'
})
})
}
}
defineExpose
({
onMounted
(()
=>
{
// handleRedInk,
getHomePageFunc
()
// handleVoid
})
})
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"app-container scroller"
>
<div
class=
"app-container
home
scroller"
>
<PageTitle
:back=
"true"
@
back=
"pageProjectManage"
>
<PageTitle
:back=
"true"
@
back=
"pageProjectManage"
>
<template
#
title
>
<template
#
title
>
返回项目管理
返回项目管理
</
template
>
</
template
>
</PageTitle>
</PageTitle>
<el-card
class=
"box-card mt20"
:body-style=
"{ padding: '0' }"
>
<div
class=
"app-container__body"
>
<div
class=
"title"
>
数据统计
</div>
<el-card
class=
"image-card"
>
<div
class=
"top"
>
<
template
#
header
>
<div
class=
"topItem"
v-for=
"(item, index) in topList"
:key=
"index"
>
<div
class=
"card-header"
>
<img
class=
"icon"
:src=
"item.icon"
alt=
""
>
<span>
数据统计
</span>
<div
class=
"name"
>
{{ item.name }}
</div>
<div
class=
"num"
>
<div>
<CountUp
:end=
"item.num"
:duration=
"3"
/>
</div>
</div>
</
template
>
<div
class=
"unit"
>
{{ item.unit }}
</div>
<div
class=
"card-content"
>
<!-- <img src="您的图片路径" alt="数据统计" /> -->
<el-row
:gutter=
"20"
>
<el-col
:span=
"4"
v-for=
"(item,index) in stats"
>
<div
class=
"stats-content"
>
<img
class=
"stats-img"
:src=
"item.url"
alt=
""
>
<div
class=
"stats-title"
>
{{item.label}}
</div>
<div
class=
"stats-value"
>
{{ item.value }}
</div>
</div>
</div>
</el-col>
</el-row>
</div>
</div>
</el-card>
<el-card
class=
"image-card"
>
<
template
#
header
>
<div
class=
"card-header"
>
<span>
系统资源
</span>
</div>
</
template
>
<div
class=
"card-content"
>
<!-- <img src="您的图片路径" alt="数据统计" /> -->
<el-row
:gutter=
"20"
>
<el-col
:span=
"8"
>
<div
class=
"chart-content"
>
<img
class=
"chart-logo"
:src=
"cpu"
alt=
""
>
<div
class=
"chart-text"
>
<div
class=
"value color-blue"
>
{{ cpuData.value }}
</div>
<div
class=
"unit color-blue"
>
核
</div>
</div>
</div>
<div
class=
"chart-title"
>
</el-card>
cpu
<el-card
class=
"box-card mt20"
:body-style=
"{ padding: '0' }"
>
<div
class=
"title"
>
系统资源
</div>
<div
class=
"bottom"
v-if=
"dataObj"
>
<div
class=
"bottomItem"
>
<img
class=
"icon"
:src=
"img.img1"
alt=
""
>
<div
class=
"name name1"
>
<div>
<CountUp
:end=
"dataObj.cpuCount"
:duration=
"2"
/>
</div>
</div>
<div
class=
"chart-container"
>
<div
class=
"unit"
>
核
</div>
<rateChart
:usage=
"cpuData.cpuUsage"
color=
"#1890ff"
/>
</div>
</div>
<div
class=
"type"
>
CPU
</div>
<el-progress
type=
"circle"
width=
"140"
:indeterminate=
"true"
:percentage=
"dataObj.percentCpuLoad"
>
<div
class=
"circle"
>
<span
class=
"name1"
>
<CountUp
:end=
"dataObj.percentCpuLoad"
:duration=
"3"
/>
%
</span>
<div>
使用率
</div>
</div>
</div>
</el-col>
</el-progress>
<el-col
:span=
"8"
>
<div
class=
"chart-content"
>
<img
class=
"chart-logo"
:src=
"neicun"
alt=
""
>
<div
class=
"chart-text"
>
<div
class=
"value color-yellowred"
>
{{ neicunData.value }}
</div>
<div
class=
"unit color-yellowred"
>
G
</div>
</div>
</div>
<div
class=
"chart-title"
>
<div
class=
"line"
></div>
内存
<div
class=
"bottomItem"
>
<img
class=
"icon"
:src=
"img.img2"
alt=
""
>
<div
class=
"name name2"
>
<div>
<CountUp
:end=
"dataObj.totalvirtualMemory"
:duration=
"2"
/>
</div>
</div>
<div
class=
"chart-container"
>
<div
class=
"unit"
>
G
</div>
<rateChart
:usage=
"neicunData.cpuUsage"
color=
"#fa7257"
/>
</div>
</div>
<div
class=
"type"
>
内存
</div>
<el-progress
type=
"circle"
width=
"140"
color=
"rgb(250, 114, 86)"
:indeterminate=
"true"
:percentage=
"dataObj.percentMemoryLoad"
>
<div
class=
"circle"
>
<span
class=
"name2"
>
<CountUp
:end=
"dataObj.percentMemoryLoad"
:duration=
"3"
/>
%
</span>
<div>
使用率
</div>
</div>
</div>
</el-col>
</el-progress>
<el-col
:span=
"8"
>
<div
class=
"chart-content"
>
<div
class=
"chart-container"
>
<DiskUsageChart
:disk-data=
"diskData"
/>
</div>
</div>
<div
class=
"line"
></div>
<div
class=
"bottomItem"
>
<HomeCharts
/>
</div>
</div>
</el-col>
</el-row>
</div>
</div>
</el-card>
</el-card>
</div>
</div>
</div>
</template>
</template>
<
style
lang=
"scss"
scoped
>
<
style
scoped
lang=
"scss"
>
.image-card
{
.home
{
width
:
100%
;
.title
{
//
max-width
:
800px
;
height
:
80px
;
margin
:
20px
auto
;
line-height
:
80px
;
}
border-bottom
:
3px
solid
#f3f5fa
;
padding-left
:
50px
;
.card-header
{
font-size
:
18px
;
font-size
:
18px
;
font-weight
:
bold
;
color
:
#333
;
padding
:
15px
;
font-weight
:
700
;
}
}
.top
{
.card-content
{
display
:
flex
;
padding
:
40px
0
;
justify-content
:
space-around
;
.stats-content
{
padding
:
40px
20px
;
width
:
100%
;
align-items
:
center
;
height
:
calc
(
400px
-
120px
-
25px
);
.topItem
{
width
:
calc
(
100%
/
6
);
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
.stats-img
{
.icon
{
height
:
64px
;
width
:
90px
;
width
:
64px
;
height
:
90px
;
}
.name
{
margin-top
:
-10px
;
margin-bottom
:
5px
;
font-size
:
12px
;
color
:
#7a8495
;
text-align
:
center
;
}
.num
{
display
:
flex
;
align-items
:
center
;
font-size
:
18px
;
color
:
#666
;
.unit
{
margin-left
:
5px
;
font-size
:
calc
(
0.46875vw
);
}
}
.stats-title
{
font-size
:
16px
;
color
:
#999
;
margin-top
:
20px
;
}
}
.stats-value
{
font-size
:
20px
;
font-weight
:
bold
;
color
:
#333
;
margin-top
:
20px
;
}
}
}
}
.chart-content
{
.bottom
{
height
:
300px
;
display
:
flex
;
align-items
:
center
;
padding
:
20px
;
height
:
304px
;
.bottomItem
{
width
:
calc
(((
100%
-
2px
)
/
3
)
-
50px
);
height
:
100%
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
align-items
:
center
;
align-items
:
center
;
.chart-logo
{
.name
{
height
:
64px
;
width
:
64px
;
}
.chart-text
{
margin-top
:
10px
;
display
:
flex
;
display
:
flex
;
align-items
:
flex-end
;
align-items
:
center
;
.value
{
font-size
:
30px
;
font-size
:
20px
;
.unit
{
margin-top
:
5px
;
margin-left
:
3px
;
font-weight
:
bold
;
font-weight
:
bold
;
font-size
:
18px
;
}
}
.unit
{
font-size
:
14px
;
margin-left
:
2px
;
}
}
.name1
{
color
:
rgb
(
31
,
133
,
223
);
}
.name2
{
color
:
rgb
(
250
,
114
,
86
);
}
}
.chart-title
{
.type
{
font-size
:
16px
;
padding-bottom
:
15px
;
color
:
#7a8495
;
}
.circle
{
span
{
font-size
:
16px
;
font-weight
:
bold
;
}
div
{
line-height
:
20px
;
font-size
:
14px
;
font-size
:
14px
;
color
:
#999
;
margin-top
:
5px
;
}
}
.chart-container
{
flex
:
1
;
width
:
100%
;
}
}
}
}
.bottomItem
:last-child
{
}
padding
:
0
50px
;
.color-blue
{
width
:
calc
(((
100%
-
2px
)
/
3
)
+
100px
);
color
:
#1890ff
;
}
}
.line
{
.color-yellowred
{
background
:
#dfe1e3
;
color
:
#fa7257
;
height
:
150px
;
width
:
1px
;
}
}
}
}
</
style
>
</
style
>
src/views/indexManage/ItemManage/modules/DiskUsageChart.vue
deleted
100644 → 0
View file @
f4f5f2e0
<
template
>
<div
class=
"disk-chart"
ref=
"chartRef"
></div>
</
template
>
<
script
setup
>
import
{
ref
,
onMounted
,
onBeforeUnmount
,
watch
}
from
'vue'
import
*
as
echarts
from
'echarts'
const
colorPalette
=
[
'#FF6384'
,
'#36A2EB'
,
'#FFCE56'
,
'#4BC0C0'
,
'#9966FF'
,
'#FF9F40'
,
'#8AC24A'
,
'#F06292'
,
'#7986CB'
,
'#E57373'
,
'#BA68C8'
,
'#64B5F6'
,
'#4DB6AC'
,
'#81C784'
,
'#FFD54F'
,
'#FF8A65'
,
'#A1887F'
,
'#90A4AE'
,
'#9575CD'
,
'#4DD0E1'
]
const
props
=
defineProps
({
diskData
:
{
type
:
Array
,
default
:
()
=>
[
{
name
:
'/run/user/0'
,
total
:
100
,
used
:
10
},
{
name
:
'/boot/efi'
,
total
:
100
,
used
:
20
},
{
name
:
'/boot'
,
total
:
100
,
used
:
30
},
{
name
:
'/run/lock'
,
total
:
100
,
used
:
5
},
{
name
:
'/dev/shm'
,
total
:
100
,
used
:
15
},
{
name
:
'/'
,
total
:
100
,
used
:
90
},
{
name
:
'/run'
,
total
:
100
,
used
:
25
}
]
}
})
const
getDiskColor
=
(
index
)
=>
{
return
colorPalette
[
index
%
colorPalette
.
length
]
}
const
chartRef
=
ref
(
null
)
let
chartInstance
=
null
const
initChart
=
()
=>
{
if
(
!
chartRef
.
value
)
return
chartInstance
=
echarts
.
init
(
chartRef
.
value
)
const
option
=
{
title
:
{
text
:
'磁盘空间'
,
left
:
'center'
,
textStyle
:
{
color
:
'#333'
,
fontSize
:
16
,
fontWeight
:
'bold'
}
},
tooltip
:
{
trigger
:
'axis'
,
axisPointer
:
{
type
:
'shadow'
},
formatter
:
function
(
params
)
{
return
`
${
params
[
0
].
name
}
<br/>
已使用:
${
params
[
0
].
value
}
G<br/>
总容量:
${
params
[
1
].
value
}
G`
}
},
grid
:
{
left
:
'3%'
,
right
:
'4%'
,
bottom
:
'3%'
,
containLabel
:
true
},
xAxis
:
{
type
:
'value'
,
boundaryGap
:
[
0
,
0.01
],
axisLabel
:
{
formatter
:
'{value}G'
},
max
:
100
,
splitLine
:
{
show
:
true
,
lineStyle
:
{
color
:
'#eee'
}
}
},
yAxis
:
{
type
:
'category'
,
data
:
props
.
diskData
.
map
(
item
=>
item
.
name
),
axisLine
:
{
show
:
true
,
lineStyle
:
{
color
:
'#999'
}
},
axisTick
:
{
show
:
false
}
},
series
:
[
{
name
:
'总容量'
,
type
:
'bar'
,
data
:
props
.
diskData
.
map
(
item
=>
item
.
total
),
itemStyle
:
{
color
:
'#f5f5f5'
,
// 浅灰色表示总容量
borderWidth
:
1
,
borderColor
:
'#d9d9d9'
},
barGap
:
'-100%'
,
// 让总容量条在已使用条后面
silent
:
true
,
// 不响应鼠标事件
label
:
{
show
:
false
},
barWidth
:
'60%'
},
{
name
:
'已使用'
,
type
:
'bar'
,
data
:
props
.
diskData
.
map
((
item
,
index
)
=>
({
value
:
item
.
used
,
itemStyle
:
{
color
:
getDiskColor
(
index
)
}
})),
label
:
{
show
:
true
,
position
:
'right'
,
formatter
:
'{c}G'
,
color
:
'#1890ff'
,
fontWeight
:
'bold'
},
barWidth
:
'60%'
},
]
}
chartInstance
.
setOption
(
option
)
}
// 监听窗口变化自动调整图表大小
const
resizeHandler
=
()
=>
{
chartInstance
?.
resize
()
}
// 监听props变化更新图表
watch
(()
=>
props
.
diskData
,
(
newVal
)
=>
{
if
(
chartInstance
)
{
chartInstance
.
setOption
({
yAxis
:
{
data
:
newVal
.
map
(
item
=>
item
.
name
)
},
series
:
[
{
data
:
newVal
.
map
(
item
=>
item
.
used
)
},
{
data
:
newVal
.
map
(
item
=>
item
.
total
)
}
]
})
}
},
{
deep
:
true
})
onMounted
(()
=>
{
initChart
()
window
.
addEventListener
(
'resize'
,
resizeHandler
)
})
onBeforeUnmount
(()
=>
{
window
.
removeEventListener
(
'resize'
,
resizeHandler
)
chartInstance
?.
dispose
()
})
</
script
>
<
style
scoped
>
.disk-chart
{
width
:
100%
;
height
:
100%
;
background-color
:
white
;
border
:
1px
solid
#f0f0f0
;
border-radius
:
4px
;
padding
:
10px
;
}
</
style
>
\ No newline at end of file
src/views/indexManage/ItemManage/modules/rateChart.vue
deleted
100644 → 0
View file @
f4f5f2e0
<
template
>
<div
class=
"cpu-usage-chart"
ref=
"chartRef"
></div>
</
template
>
<
script
setup
>
import
{
ref
,
onMounted
,
onBeforeUnmount
,
watch
}
from
'vue'
import
*
as
echarts
from
'echarts'
const
props
=
defineProps
({
usage
:
{
type
:
Number
,
default
:
0
},
color
:
{
type
:
String
,
default
:
'#1890ff'
}
})
const
chartRef
=
ref
(
null
)
let
chartInstance
=
null
const
initChart
=
()
=>
{
if
(
!
chartRef
.
value
)
return
chartInstance
=
echarts
.
init
(
chartRef
.
value
)
const
option
=
{
series
:
[{
type
:
'gauge'
,
startAngle
:
90
,
endAngle
:
-
270
,
pointer
:
{
show
:
false
},
progress
:
{
show
:
true
,
overlap
:
false
,
roundCap
:
true
,
clip
:
false
,
itemStyle
:
{
color
:
props
.
color
// 进度条颜色 - 蓝色
}
},
axisLine
:
{
lineStyle
:
{
width
:
10
,
color
:
[[
1
,
'#f0f0f0'
]]
// 背景环颜色 - 浅灰色
}
},
axisTick
:
{
show
:
false
},
splitLine
:
{
show
:
false
},
axisLabel
:
{
show
:
false
},
detail
:
{
valueAnimation
:
true
,
offsetCenter
:
[
0
,
'0%'
],
formatter
:
'{value}%'
,
color
:
props
.
color
,
// 百分比数字颜色 - 蓝色
fontSize
:
24
,
fontWeight
:
'bold'
},
title
:
{
offsetCenter
:
[
0
,
'30%'
],
color
:
'#666'
,
// "使用率"文字颜色 - 灰色
fontSize
:
14
},
data
:
[{
value
:
props
.
usage
,
name
:
'使用率'
}]
}],
// title: {
// text: 'cpu',
// left: 'center',
// top: '10%',
// textStyle: {
// color: '#666', // "cpu"文字颜色 - 灰色
// fontSize: 14
// }
// }
}
chartInstance
.
setOption
(
option
)
}
// 监听窗口变化自动调整图表大小
const
resizeHandler
=
()
=>
{
chartInstance
?.
resize
()
}
// 监听props变化更新图表
watch
(()
=>
props
.
usage
,
(
newVal
)
=>
{
if
(
chartInstance
)
{
chartInstance
.
setOption
({
series
:
[{
data
:
[{
value
:
newVal
,
name
:
'使用率'
}]
}]
})
}
})
onMounted
(()
=>
{
initChart
()
window
.
addEventListener
(
'resize'
,
resizeHandler
)
})
onBeforeUnmount
(()
=>
{
window
.
removeEventListener
(
'resize'
,
resizeHandler
)
chartInstance
?.
dispose
()
})
</
script
>
<
style
scoped
>
.cpu-usage-chart
{
width
:
100%
;
height
:
100%
;
background-color
:
white
;
/* 白色背景 */
}
</
style
>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论