From 3c5ca2f8ce690f2c8808548e5ce5f69da296de10 Mon Sep 17 00:00:00 2001
From: Your Name <123456>
Date: Wed, 17 Aug 2022 09:12:33 +0800
Subject: [PATCH] lct
---
src/views/intellectInspect/intelligentLine/index.vue | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/views/intellectInspect/intelligentLine/index.vue b/src/views/intellectInspect/intelligentLine/index.vue
index 15d473e..50d8ed4 100644
--- a/src/views/intellectInspect/intelligentLine/index.vue
+++ b/src/views/intellectInspect/intelligentLine/index.vue
@@ -85,7 +85,7 @@
<script lang="ts">
import screenfull from 'screenfull';
import { lineApi } from '/@/api/intelligentLine';
-import { toRefs, reactive, ref, onMounted, onUnmounted, computed } from 'vue';
+import {toRefs, reactive, ref, onMounted, onUnmounted, computed, nextTick} from 'vue';
import {useRoute} from 'vue-router';
import { storeToRefs } from 'pinia';
import { initBackEndControlRoutes } from '/@/router/backEnd';
@@ -217,9 +217,11 @@
// 页面关闭处理
onUnmounted(() => {
// 销毁监听
- state.socket.onclose = () => {
- console.log('socket已经关闭');
- };
+ nextTick(()=>{
+ state.socket.onclose = () => {
+ console.log('socket已经关闭');
+ };
+ })
});
return {
dataList,
--
Gitblit v1.9.2