优化 全屏功能

This commit is contained in:
mmc
2026-06-12 11:03:38 +08:00
parent 9734535adf
commit 05be297c7f
7 changed files with 47 additions and 19 deletions

View File

@@ -66,7 +66,7 @@ export default class DeviceController {
// 切后台:关闭 WS
if (document.visibilityState === 'hidden') {
console.log('🔌 页面切后台,关闭 WebSocket');
this.release();
//this.release();
wsManager.close();
this.connectedDeviceSn = null;
@@ -127,7 +127,7 @@ export default class DeviceController {
this.unSubMessage?.();
this.unSubStatus?.();
this.release();
//this.release();
//wsManager.close();
this.connectedDeviceSn = null;
@@ -158,7 +158,7 @@ export default class DeviceController {
this.isControlled = false;
this.onControlStatusChange?.(false);
//wsManager.close();
wsManager.close();
try {
const res = await getControlRight({