Skip to content

Commit 9b8fb25

Browse files
authored
Merge pull request #1189 from woncode/patch-1
fix:离开仪表盘页面时关闭WebSocket,避免一直在后台拉取信息损耗性能
2 parents dbaee66 + b9c3607 commit 9b8fb25

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/src/views/dashboard/ServerAnalytic.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ onMounted(() => {
9090
})
9191
})
9292
93+
onUnmounted(() => {
94+
websocket?.close()
95+
})
96+
9397
function handle_uptime(t: number) {
9498
// uptime
9599
let _uptime = Math.floor(t)

0 commit comments

Comments
 (0)