mirror of
https://github.com/marktext/marktext.git
synced 2025-05-03 00:01:19 +08:00
parent
669918bda2
commit
761ff169b0
@ -59,6 +59,11 @@ const mutations = {
|
|||||||
window.DIRNAME = pathname ? path.dirname(pathname) : ''
|
window.DIRNAME = pathname ? path.dirname(pathname) : ''
|
||||||
bus.$emit('file-changed', { id, markdown, cursor, renderCursor: true, history })
|
bus.$emit('file-changed', { id, markdown, cursor, renderCursor: true, history })
|
||||||
}
|
}
|
||||||
|
// Handle close the last tab, need to reset the TOC state
|
||||||
|
if (Object.keys(fileState).length === 0) {
|
||||||
|
state.listToc = []
|
||||||
|
state.toc = []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Exchange from with to and move from to the end if to is null or empty.
|
// Exchange from with to and move from to the end if to is null or empty.
|
||||||
|
Loading…
Reference in New Issue
Block a user