From c49ef334bcb1981d6f13eee4e80e7f54427a2869 Mon Sep 17 00:00:00 2001
From: hejianhao <15708179461@qq.com>
Date: 星期一, 21 四月 2025 17:20:30 +0800
Subject: [PATCH] Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/leshan-laboratory

---
 src/components/AiEditor/index.vue |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/components/AiEditor/index.vue b/src/components/AiEditor/index.vue
index 1f04380..c0bc236 100644
--- a/src/components/AiEditor/index.vue
+++ b/src/components/AiEditor/index.vue
@@ -54,7 +54,7 @@
   watch: {
     value: {
       handler(newVal) {
-        if (this.editor && newVal !== this.editor.getContent()) {
+        if (this.editor && newVal !== this.editor.getHtml()) {
           this.editor.setContent(newVal)
         }
       },
@@ -95,7 +95,9 @@
         // 禁用 AI 功能
         ai: false,
         // 禁用调整大小功能
-        resize: false
+        resize: false,
+        // 添加唯一标识
+        id: `editor-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`
       }
 
       try {
@@ -112,7 +114,7 @@
     },
     // 获取编辑器内容
     getContent() {
-      return this.editor ? this.editor.getContent() : ''
+      return this.editor ? this.editor.getHtml() : ''
     },
     // 设置编辑器内容
     setContent(content) {

--
Gitblit v1.7.1