diff --git a/registry/lib/components/live/danmaku-sendbar/DanmakuSendbar.vue b/registry/lib/components/live/danmaku-sendbar/DanmakuSendbar.vue index 6fdf82f20..e1b626f5b 100644 --- a/registry/lib/components/live/danmaku-sendbar/DanmakuSendbar.vue +++ b/registry/lib/components/live/danmaku-sendbar/DanmakuSendbar.vue @@ -54,7 +54,7 @@ export default defineComponent({ changeEventHook = true } }, - beforeDestroy() { + beforeUnmount() { this.originalTextArea.removeEventListener('input', this.listenChange) this.originalTextArea.removeEventListener('change', this.listenChange) }, diff --git a/registry/lib/components/style/custom-navbar/CustomNavbarItem.vue b/registry/lib/components/style/custom-navbar/CustomNavbarItem.vue index 6683fb5ce..1b818dd2a 100644 --- a/registry/lib/components/style/custom-navbar/CustomNavbarItem.vue +++ b/registry/lib/components/style/custom-navbar/CustomNavbarItem.vue @@ -100,7 +100,7 @@ const ThisComponent = defineComponent({ removeComponentListener('customNavbar.openInNewTab', listener) } }, - beforeDestroy() { + beforeUnmount() { this.cancelListeners?.() }, methods: { diff --git a/registry/lib/components/style/home-redesign/fresh/VideoList.vue b/registry/lib/components/style/home-redesign/fresh/VideoList.vue index dad7e2278..fc4e0b781 100644 --- a/registry/lib/components/style/home-redesign/fresh/VideoList.vue +++ b/registry/lib/components/style/home-redesign/fresh/VideoList.vue @@ -52,7 +52,7 @@ export default defineComponent({ } }, }, - beforeDestroy() { + beforeUnmount() { cleanUpScrollMask(this.$el) }, mounted() { diff --git a/registry/lib/components/style/home-redesign/fresh/layouts/blackboard/Blackboard.vue b/registry/lib/components/style/home-redesign/fresh/layouts/blackboard/Blackboard.vue index cc9ab3bfd..b16e6348b 100644 --- a/registry/lib/components/style/home-redesign/fresh/layouts/blackboard/Blackboard.vue +++ b/registry/lib/components/style/home-redesign/fresh/layouts/blackboard/Blackboard.vue @@ -81,7 +81,7 @@ export default defineComponent({ mounted() { this.createTimer() }, - beforeDestroy() { + beforeUnmount() { this.destroyTimer() }, methods: { diff --git a/registry/lib/components/style/home-redesign/fresh/layouts/categories/content/BangumiTimeline.vue b/registry/lib/components/style/home-redesign/fresh/layouts/categories/content/BangumiTimeline.vue index 9820efd3a..4dba69f38 100644 --- a/registry/lib/components/style/home-redesign/fresh/layouts/categories/content/BangumiTimeline.vue +++ b/registry/lib/components/style/home-redesign/fresh/layouts/categories/content/BangumiTimeline.vue @@ -211,7 +211,7 @@ export default defineComponent({ } element.addEventListener('animationend', endHandler) }, - beforeDestroy() { + beforeUnmount() { if (this.timer) { clearInterval(this.timer) } diff --git a/registry/lib/components/utils/dev-client/Action.vue b/registry/lib/components/utils/dev-client/Action.vue index c0284b721..7517a04ff 100644 --- a/registry/lib/components/utils/dev-client/Action.vue +++ b/registry/lib/components/utils/dev-client/Action.vue @@ -78,7 +78,7 @@ export default defineComponent({ devClient.addEventListener(DevClientEvents.ServerChange, this.handleServerChange) devClient.addEventListener(DevClientEvents.SessionsUpdate, this.handleSessionsUpdate) }, - async beforeDestroy() { + async beforeUnmount() { const { devClient } = await import('./client') devClient.removeEventListener(DevClientEvents.SessionsUpdate, this.handleSessionsUpdate) }, diff --git a/registry/lib/components/utils/dev-client/Widget.vue b/registry/lib/components/utils/dev-client/Widget.vue index e805c5877..976ba5dc1 100644 --- a/registry/lib/components/utils/dev-client/Widget.vue +++ b/registry/lib/components/utils/dev-client/Widget.vue @@ -48,7 +48,7 @@ export default defineComponent({ devClient.addEventListener(DevClientEvents.ServerChange, this.updateConnectionStatus) // devClient.addEventListener(DevClientEvents.SessionsUpdate, this.updateSessionsStatus) }, - beforeDestroy() { + beforeUnmount() { const devClient = this.client as DevClient devClient.removeEventListener(DevClientEvents.ServerChange, this.updateConnectionStatus) // devClient.removeEventListener(DevClientEvents.SessionsUpdate, this.updateSessionsStatus) diff --git a/registry/lib/components/video/default-location/Advanced.vue b/registry/lib/components/video/default-location/Advanced.vue index 0d634d000..a1b621087 100644 --- a/registry/lib/components/video/default-location/Advanced.vue +++ b/registry/lib/components/video/default-location/Advanced.vue @@ -91,7 +91,7 @@ export default defineComponent({ created() { this.setupObserveScroll() }, - beforeDestroy() { + beforeUnmount() { scrollObserver.stop() }, methods: { diff --git a/registry/lib/components/video/default-location/Options.vue b/registry/lib/components/video/default-location/Options.vue index 47329b0b7..f496d635c 100644 --- a/registry/lib/components/video/default-location/Options.vue +++ b/registry/lib/components/video/default-location/Options.vue @@ -97,7 +97,7 @@ export default defineComponent({ panelObserver.start() } }, - beforeDestroy() { + beforeUnmount() { if (panelObserver) { panelObserver.stop() } diff --git a/src/ui/ImageViewer.vue b/src/ui/ImageViewer.vue index 6f5bd5c7d..b7e340bc6 100644 --- a/src/ui/ImageViewer.vue +++ b/src/ui/ImageViewer.vue @@ -80,7 +80,7 @@ export default defineComponent({ true, ) }, - beforeDestroy() { + beforeUnmount() { document.removeEventListener('keydown', this.keyHandler) }, methods: {