ソースを参照

页面销毁的时候关闭定时器

wyh 1 年間 前
コミット
8331a8dfe2
共有1 個のファイルを変更した4 個の追加0 個の削除を含む
  1. 4 0
      src/views/modules_guAn/visualization/modules/EquipmentInfo.vue

+ 4 - 0
src/views/modules_guAn/visualization/modules/EquipmentInfo.vue

@@ -249,6 +249,10 @@ export default {
         this.counter = 0;
       }
     }
+  },
+  // 销毁定时器
+  beforeDestroy(){
+    clearTimeout(this.showData)
   }
 }
 </script>