Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue_django_test
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周田
vue_django_test
Commits
3e88f29b
Commit
3e88f29b
authored
Sep 06, 2023
by
周田
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mod: 注销组件时,关闭 websocket 通信
parent
3e57e0f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
Chat.vue
frontend/src/components/home/Chat.vue
+5
-1
DevicePerformanceTabel.vue
frontend/src/components/home/DevicePerformanceTabel.vue
+1
-3
No files found.
frontend/src/components/home/Chat.vue
View file @
3e88f29b
...
...
@@ -45,7 +45,7 @@
</template>
<
script
setup
lang=
"ts"
>
import
{
ref
,
onMounted
,
watch
}
from
'vue'
;
import
{
ref
,
onMounted
,
watch
,
onBeforeUnmount
}
from
'vue'
;
import
{
ElScrollbar
,
ElInput
,
ElButton
,
ElSelect
,
ElOption
,
ElMessage
}
from
'element-plus'
;
import
DevicePerformanceTable
from
'@/components/home/DevicePerformanceTabel'
import
axios
from
'axios'
;
...
...
@@ -113,6 +113,10 @@ onMounted(() => {
})
})
onBeforeUnmount
(()
=>
{
chatSocket
?.
close
();
})
// 添加设备监控操作
const
deviceInfos
=
ref
<
any
[]
>
([]);
const
selectedDeviceName
=
ref
<
string
>
(
''
)
...
...
frontend/src/components/home/DevicePerformanceTabel.vue
View file @
3e88f29b
...
...
@@ -74,9 +74,7 @@ const del = () => {
}
onBeforeUnmount
(()
=>
{
if
(
table_websocket
!
.
OPEN
)
{
table_websocket
!
.
close
()
}
table_websocket
?.
close
()
})
</
script
>
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