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({
// Vueが何故かWatchを発動させない場合があるので
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: {