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);
},
});