Explorar el Código

🎈 perf: 移除画中画

wolyshaw hace 3 años
padre
commit
5ecabfba45
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      src/components/live-broadcast/index.tsx

+ 4 - 4
src/components/live-broadcast/index.tsx

@@ -40,14 +40,14 @@ export default defineComponent({
     RuntimeUtils.loopSyncLike()
     event.on(LIVE_EVENT_MESSAGE['RC:Chatroom:Like'], this.onLikeMessage)
     window.onbeforeunload = this.beforeunload
-    window.addEventListener('focus', this.visibilitychange)
-    window.addEventListener('blur', this.visibilitychange)
+    // window.addEventListener('focus', this.visibilitychange)
+    // window.addEventListener('blur', this.visibilitychange)
   },
   beforeUnmount() {
     event.off(LIVE_EVENT_MESSAGE['RC:Chatroom:Like'], this.onLikeMessage)
     window.onbeforeunload = null
-    window.removeEventListener('focus', this.visibilitychange)
-    window.removeEventListener('blur', this.visibilitychange)
+    // window.removeEventListener('focus', this.visibilitychange)
+    // window.removeEventListener('blur', this.visibilitychange)
   },
   methods: {
     visibilitychange(evt: FocusEvent) {