This commit is contained in:
syuilo 2020-09-19 14:04:24 +09:00
parent f661cb765a
commit 7f7fe3f94c
35 changed files with 154 additions and 120 deletions

View file

@ -128,7 +128,7 @@ export default defineComponent({
});
},
beforeDestroy() {
beforeUnmount() {
this.enabled = false;
},

View file

@ -191,7 +191,7 @@ export default defineComponent({
});
},
beforeDestroy() {
beforeUnmount() {
this.textarea.removeEventListener('keydown', this.onKeydown);
for (const el of Array.from(document.querySelectorAll('body *'))) {

View file

@ -89,7 +89,7 @@ export default defineComponent({
}
},
beforeDestroy() {
beforeUnmount() {
this.reset();
},

View file

@ -112,7 +112,7 @@ export default defineComponent({
}
},
beforeDestroy() {
beforeUnmount() {
if (!this.isMainColumn) {
this.$root.$off('deck.column.dragStart', this.onOtherDragStart);
this.$root.$off('deck.column.dragEnd', this.onOtherDragEnd);

View file

@ -147,7 +147,7 @@ export default defineComponent({
document.addEventListener('keydown', this.onKeydown);
},
beforeDestroy() {
beforeUnmount() {
document.removeEventListener('keydown', this.onKeydown);
},

View file

@ -165,7 +165,7 @@ export default defineComponent({
}
},
beforeDestroy() {
beforeUnmount() {
this.connection.dispose();
this.ilFilesObserver.disconnect();
},

View file

@ -75,7 +75,7 @@ export default defineComponent({
this.connection.on('unfollow', this.onFollowChange);
},
beforeDestroy() {
beforeUnmount() {
this.connection.dispose();
},

View file

@ -49,7 +49,7 @@ export default defineComponent({
this.tick();
this.clock = setInterval(this.tick, 1000);
},
beforeDestroy() {
beforeUnmount() {
clearInterval(this.clock);
},
methods: {

View file

@ -47,7 +47,7 @@ export default defineComponent({
this.size();
window.addEventListener('resize', this.size);
},
beforeDestroy() {
beforeUnmount() {
window.removeEventListener('resize', this.size);
},
activated() {

View file

@ -65,7 +65,7 @@ export default defineComponent({
// VueWatch
this.clock = setInterval(this.draw, 1000);
},
beforeDestroy() {
beforeUnmount() {
clearInterval(this.clock);
},
methods: {

View file

@ -293,7 +293,7 @@ export default defineComponent({
this.noteBody = this.$refs.noteBody;
},
beforeDestroy() {
beforeUnmount() {
this.decapture(true);
if (this.$store.getters.isSignedIn) {

View file

@ -117,7 +117,7 @@ export default defineComponent({
}
},
beforeDestroy() {
beforeUnmount() {
if (!this.notification.isRead) {
this.readObserver.unobserve(this.$el);
this.connection.dispose();

View file

@ -79,7 +79,7 @@ export default defineComponent({
this.connection.on('notification', this.onNotification);
},
beforeDestroy() {
beforeUnmount() {
this.connection.dispose();
},

View file

@ -71,7 +71,7 @@ export default defineComponent({
});
},
beforeDestroy() {
beforeUnmount() {
if (this.hpml.aiscript) this.hpml.aiscript.abort();
},
});

View file

@ -26,7 +26,7 @@ export default defineComponent({
created() {
os.stream.on('_disconnected_', this.onDisconnected);
},
beforeDestroy() {
beforeUnmount() {
os.stream.off('_disconnected_', this.onDisconnected);
},
methods: {

View file

@ -55,7 +55,7 @@ export default defineComponent({
this.tickId = window.requestAnimationFrame(this.tick);
}
},
destroyed() {
unmounted() {
if (this.mode === 'relative' || this.mode === 'detail') {
window.clearTimeout(this.tickId);
}

View file

@ -136,7 +136,7 @@ export default defineComponent({
},
},
beforeDestroy() {
beforeUnmount() {
(window as any).removeEventListener('message', this.adjustTweetHeight);
},
});

View file

@ -154,7 +154,7 @@ export default defineComponent({
this.connection.on('statsLog', this.onStatsLog);
},
beforeDestroy() {
beforeUnmount() {
this.connection.off('stats', this.onStats);
this.connection.off('statsLog', this.onStatsLog);
},

View file

@ -534,7 +534,7 @@ export default defineComponent({
});
},
beforeDestroy() {
beforeUnmount() {
this.connection.off('stats', this.onStats);
this.connection.off('statsLog', this.onStatsLog);
this.connection.dispose();

View file

@ -156,7 +156,7 @@ export default defineComponent({
this.connection.on('statsLog', this.onStatsLog);
},
beforeDestroy() {
beforeUnmount() {
this.connection.off('stats', this.onStats);
this.connection.off('statsLog', this.onStatsLog);
},

View file

@ -52,7 +52,7 @@ export default defineComponent({
});
},
beforeDestroy() {
beforeUnmount() {
this.connection.dispose();
},

View file

@ -78,7 +78,7 @@ export default defineComponent({
});
},
beforeDestroy() {
beforeUnmount() {
this.connection.dispose();
},

View file

@ -88,7 +88,7 @@ export default defineComponent({
}
},
beforeDestroy() {
beforeUnmount() {
this.connection.dispose();
document.removeEventListener('visibilitychange', this.onVisibilitychange);

View file

@ -158,7 +158,7 @@ export default defineComponent({
}
},
beforeDestroy() {
beforeUnmount() {
room.destroy();
window.removeEventListener('beforeunload', this.beforeunload);
},

View file

@ -124,7 +124,7 @@ export default defineComponent({
},
},
beforeDestroy() {
beforeUnmount() {
window.removeEventListener('beforeunload', this.beforeunload);
},

View file

@ -171,7 +171,7 @@ export default defineComponent({
mounted() {
window.requestAnimationFrame(this.parallaxLoop);
this.$once('hook:beforeDestroy', () => {
this.$once('hook:beforeUnmount', () => {
window.cancelAnimationFrame(this.parallaxAnimationId);
});
},

View file

@ -70,7 +70,7 @@ export default (opts) => ({
});
},
beforeDestroy() {
beforeUnmount() {
this.ilObserver.disconnect();
if (this.$refs.loadMore) this.loadMoreElement.removeEventListener('click', this.fetchMore);
},

View file

@ -66,7 +66,7 @@ export default defineComponent({
this.tick();
this.clock = setInterval(this.tick, 1000);
},
beforeDestroy() {
beforeUnmount() {
clearInterval(this.clock);
},
methods: {

View file

@ -55,7 +55,7 @@ export default defineComponent({
this.clock = setInterval(this.tick, this.props.showMs ? 10 : 1000);
}, { immediate: true });
},
beforeDestroy() {
beforeUnmount() {
clearInterval(this.clock);
},
methods: {

View file

@ -65,7 +65,7 @@ export default defineComponent({
this.fetch();
this.clock = setInterval(this.fetch, 1000 * 60);
},
beforeDestroy() {
beforeUnmount() {
clearInterval(this.clock);
},
methods: {

View file

@ -62,7 +62,7 @@ export default defineComponent({
this.fetching = false;
});
},
beforeDestroy() {
beforeUnmount() {
this.connection.dispose();
},
methods: {

View file

@ -51,7 +51,7 @@ export default defineComponent({
this.clock = setInterval(this.fetch, 60000);
this.$watch(() => this.props.url, this.fetch);
},
beforeDestroy() {
beforeUnmount() {
clearInterval(this.clock);
},
methods: {

View file

@ -51,7 +51,7 @@ export default defineComponent({
this.fetch();
this.clock = setInterval(this.fetch, 1000 * 60);
},
beforeDestroy() {
beforeUnmount() {
clearInterval(this.clock);
},
methods: {