We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83ee3ad commit 4d11c2fCopy full SHA for 4d11c2f
src/components/NoteRich.vue
@@ -49,6 +49,7 @@ export default {
49
watch: {
50
$route(to, from) {
51
if (to.name !== from.name || to.params.noteId !== from.params.noteId) {
52
+ this.onClose(from.params.noteId)
53
this.fetchData()
54
}
55
},
@@ -112,6 +113,14 @@ export default {
112
113
})
114
115
116
+ onClose(noteId) {
117
+ const note = store.getters.getNote(parseInt(noteId))
118
+ store.commit('updateNote', {
119
+ ...note,
120
+ unsaved: false,
121
+ })
122
+ },
123
+
124
fileUpdated({ fileid }) {
125
if (this.note.id === fileid) {
126
this.onEdit({ unsaved: false })
0 commit comments