Sfoglia il codice sorgente

fix(gwnrgl/xwgl): 修复新闻详情编辑器引用和内容转换问题- 修复 Quill 编辑器引用方式,确保正确获取编辑器实例
- 优化内容转换逻辑,增加可选链操作符防止运行时错误- 确保新闻详情内容正确渲染和编辑

nahida 6 mesi fa
parent
commit
2d9de5d113
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      src/views/gwnrgl/xwgl/index.vue

+ 2 - 2
src/views/gwnrgl/xwgl/index.vue

@@ -82,7 +82,7 @@ const getImagesFromContent = (content) => {
   if (!content) return []
 
   const delta = typeof content === 'string' ?
-      quillRef.value?.clipboard.convert(content) :
+      quillRef.value?.clipboard?.convert(content) :
       content
 
   const images = []
@@ -654,7 +654,7 @@ const handleDialogClose = () => {
           <div class="w-full">
             <!-- 添加编辑器就绪事件 -->
             <QuillEditor
-                :ref="quillRef"
+                ref="quillRef"
                 v-model:content="formData.newsDetails"
                 :options="quillOptions"
                 content-type="html"