This commit is contained in:
syuilo
2020-07-24 19:35:19 +09:00
parent 0bf4c5cb29
commit a02bd7061a
9 changed files with 73 additions and 64 deletions

View File

@@ -46,11 +46,6 @@ export default defineComponent({
},
created() {
this.$once('hook:beforeDestroy', () => {
this.connection.dispose();
if (this.connection2) this.connection2.dispose();
});
const prepend = note => {
const _note = JSON.parse(JSON.stringify(note)); // deepcopy
(this.$refs.tl as any).prepend(_note);
@@ -130,6 +125,11 @@ export default defineComponent({
};
},
beforeUnmount() {
this.connection.dispose();
if (this.connection2) this.connection2.dispose();
},
methods: {
focus() {
this.$refs.tl.focus();