diff --git a/src/components/editor/TiptapEditor.vue b/src/components/editor/TiptapEditor.vue index fa7b4a4..7ecedc9 100644 --- a/src/components/editor/TiptapEditor.vue +++ b/src/components/editor/TiptapEditor.vue @@ -704,6 +704,8 @@ function onSendMessage() { editor.value?.commands.clearContent(true) // 清空引用数据 quoteData.value = null + // 更新草稿 + onEditorChange() } } @@ -790,6 +792,17 @@ function onSubscribeQuote(data) { // 保存引用数据 quoteData.value = data + // 更新草稿 + onEditorChange() +} + +/** + * 清空引用数据并更新草稿 + */ +function clearQuoteData() { + quoteData.value = null + // 更新草稿 + onEditorChange() } /** @@ -894,7 +907,7 @@ useEventBus([