qymljy 1 год назад
Родитель
Сommit
62121d8276
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      src/components/socketMessage/index.vue

+ 3 - 1
src/components/socketMessage/index.vue

@@ -104,7 +104,9 @@
     },
     destroyed () {
       // 销毁监听
-      this.socket.onclose = this.close
+      let that = this
+      this.socket.onclose = that.close
+
     },
     beforeDestroy () {
       clearInterval(this.realTimeClData);