Bladeren bron

富文本使用多个的情况

秦鹏 3 jaren geleden
bovenliggende
commit
9888840517

+ 6 - 4
src/components/Adult/inputModules/Tinydemo.vue

@@ -18,7 +18,7 @@
     </div>
     <div class="adult-book-input-item">
       <span class="adult-book-lable">图片:</span>
-      <Upload :changeFillId="changeImage" :uploadType="'image'" />
+      <Upload :changeFillId="changeImage" :uploadType="'image'" :filleNumber="999" />
     </div>
     <ul v-if="curQue.img_list.length > 0" class="uploadArt_list">
       <li
@@ -33,7 +33,7 @@
       </li>
     </ul>
     <div class="main">
-      <Editor id="tinydemo" v-model="curQue.con" :init="init" />
+      <Editor :id="'tinydemo'+number" v-model="curQue.con" :init="init" />
     </div>
   </div>
 </template>
@@ -67,7 +67,7 @@ import { CopyToClipboard } from "@/utils/auth";
 
 export default {
   components: { Editor, Upload },
-  props: ["curQue", "fn_data", "changeCurQue"],
+  props: ["curQue", "fn_data", "changeCurQue","number"],
   data() {
     return {
       init: {
@@ -121,7 +121,9 @@ export default {
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
-    tinymce.init({});
+    tinymce.init({
+      selector: `#tinydemo${this.number}`,
+    });
   },
   beforeCreate() {}, //生命周期 - 创建之前
   beforeMount() {}, //生命周期 - 挂载之前

+ 4 - 1
src/components/Adult/preview/TableView.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="TableView" v-if="curQue">
+    <!-- 表格 -->
     <div class="table">
       <table>
         <template v-if="curQue.headerList.length > 0">
@@ -29,6 +30,7 @@
         </tr>
       </table>
     </div>
+    <!-- 提示语 -->
     <div class="hint">
       <p>{{ curQue.hintTitle }}</p>
       <div>
@@ -38,6 +40,7 @@
         </div>
       </div>
     </div>
+    <!-- 录音 -->
     <div class="record">
       <Soundrecord @handleWav="handleWav" type="pro-plus" class="luyin-box" />
     </div>
@@ -174,7 +177,7 @@ export default {
             outline: none;
             border: none;
             // border-bottom: 1px solid black;
-            width: 100%;
+            width: 90%;
             height: 100%;
           }
         }

+ 4 - 0
src/views/adultInput.vue

@@ -506,6 +506,7 @@
                       :type="topicIitem.type"
                       :fn_data="fn_data"
                       :changeCurQue="changeCurQue"
+                      :number="toindex + rowIndex + lineIndex"
                     />
                   </template>
                   <template v-else> </template>
@@ -934,6 +935,9 @@ export default {
           });
         }
       );
+      this.TopicIndex = null;
+      this.RowIndex = null;
+      this.LineIndex = null;
       this.$forceUpdate();
     },
     changeCurrentTreeID(val) {