Browse Source

🎈 perf: 移除画中画

wolyshaw 3 năm trước cách đây
mục cha
commit
5ecabfba45
1 tập tin đã thay đổi với 4 bổ sung4 xóa
  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) {