fix(editor): 切换会话时清空引用数据而非保留

修改编辑器行为,在切换会话时主动清空引用数据而不是保留之前的引用。这避免了不同会话间引用数据的混淆问题。
This commit is contained in:
Phoenix 2025-07-02 16:04:41 +08:00
parent 14d69d40d3
commit a405a3bd90

View File

@ -739,8 +739,7 @@ function onEditorChange() {
function loadEditorDraftText() {
if (!editor.value) return
//
const currentQuoteData = quoteData.value
//
quoteData.value = null
// 稿
@ -761,11 +760,6 @@ function loadEditorDraftText() {
editor.value.commands.clearContent(true) // 稿
}
// 使
if (currentQuoteData) {
quoteData.value = currentQuoteData
}
//
editor.value.commands.focus('end')
}