update
1.优化
This commit is contained in:
@@ -354,6 +354,8 @@
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
if (qhInterval.value) clearInterval(qhInterval.value);
|
||||
if (cInterval.value) clearInterval(cInterval.value);
|
||||
// 监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常。
|
||||
window.onbeforeunload = function () {
|
||||
closeSocket();
|
||||
|
||||
Reference in New Issue
Block a user