Browse Source

清除时间

林旭祥 7 tháng trước cách đây
mục cha
commit
c2d5144249
2 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 1 0
      src/utils/handWs.ts
  2. 1 0
      src/utils/trainWs.ts

+ 1 - 0
src/utils/handWs.ts

@@ -150,6 +150,7 @@ export function useWebSocket() {
     //   // }
     //   socketHand = null;
     // }
+    // getClearTimer();
     // if (socketHand) {
     //   socketHand.close();
     //   socketHand = null;

+ 1 - 0
src/utils/trainWs.ts

@@ -605,6 +605,7 @@ export function useWs() {
   }
 
   onUnmounted(() => {
+    getClearTimer();
     if (socket) {
       socket.close();
       socket = null;