Skip to content

Commit a03a0ec

Browse files
committed
fix(#866): 切换页面时导致编辑器内容会被回退
1 parent a9f6f75 commit a03a0ec

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/app/core/article/md-editor.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ export function MdEditor() {
332332
}
333333
if (activeFilePathRef.current) {
334334
saveCurrentArticle(value)
335+
setCurrentArticle(value) // 同时更新 store 中的 currentArticle,避免切换页面时内容丢失
335336
emitter.emit('editor-input')
336337
handleLocalImage(vditor)
337338

0 commit comments

Comments
 (0)