|
@@ -72,6 +72,7 @@ export default {
|
|
|
// 通过$once来监听定时器,在beforeDestroy钩子可以被清除。
|
|
|
this.$once("hook:beforeDestroy", () => {
|
|
|
this.websocket.close();
|
|
|
+ console.log("关闭websocket连接");
|
|
|
});
|
|
|
},
|
|
|
changeState(data) {
|
|
@@ -95,7 +96,7 @@ export default {
|
|
|
},
|
|
|
close() {
|
|
|
this.websocket.close();
|
|
|
- console.log(123);
|
|
|
+ console.log("关闭websocket连接");
|
|
|
},
|
|
|
},
|
|
|
computed: {
|