Selaa lähdekoodia

去掉各组件监听样式调整刷新富文本

natasha 1 viikko sitten
vanhempi
commit
793f72bac2

+ 6 - 21
src/views/book/courseware/create/components/question/article/NewWord.vue

@@ -2,7 +2,7 @@
   <div>
     <label>标题:</label>
     <RichText
-      v-if="property.isGetContent && isChange"
+      v-if="property.isGetContent"
       ref="richText"
       v-model="data.title_con"
       :inline="true"
@@ -115,7 +115,7 @@
         </div>
         <div class="table-item" style="width: 110px">
           <RichText
-            v-if="property.isGetContent && isChange"
+            v-if="property.isGetContent"
             ref="richText"
             v-model="item.cixing"
             :inline="true"
@@ -136,7 +136,7 @@
         </div>
         <div class="table-item" style="width: 200px">
           <RichText
-            v-if="property.isGetContent && isChange"
+            v-if="property.isGetContent"
             ref="richText"
             v-model="item.definition_list"
             :inline="true"
@@ -149,7 +149,7 @@
         </div>
         <div class="table-item" style="width: 200px">
           <RichText
-            v-if="property.isGetContent && isChange"
+            v-if="property.isGetContent"
             ref="richText"
             v-model="item.collocation"
             :inline="true"
@@ -161,7 +161,7 @@
         </div>
         <div class="table-item" style="width: 300px">
           <RichText
-            v-if="property.isGetContent && isChange"
+            v-if="property.isGetContent"
             ref="richText"
             v-model="item.liju_list"
             :inline="true"
@@ -180,7 +180,7 @@
         </div>
         <div class="table-item" style="width: 200px" v-for="(itemN, indexN) in data.addCol" :key="indexN">
           <RichText
-            v-if="property.isGetContent && isChange"
+            v-if="property.isGetContent"
             ref="richText"
             v-model="item[itemN.key]"
             :inline="true"
@@ -397,20 +397,6 @@ export default {
       autoLoading: false,
     };
   },
-  watch: {
-    'data.unified_attrib': {
-      handler(val) {
-        if (val) {
-          this.isChange = false;
-          setTimeout(() => {
-            this.isChange = true;
-          }, 10);
-        }
-      },
-      deep: true,
-      immediate: true,
-    },
-  },
   created() {
     this.getTextToAudioConfParamList();
   },
@@ -431,7 +417,6 @@ export default {
         hz_info: [],
         bg: 0,
         ed: 0,
-        isChange: true,
       };
     },
     /**

+ 5 - 18
src/views/book/courseware/create/components/question/article/Notes.vue

@@ -2,7 +2,7 @@
   <div>
     <label>标题:</label>
     <RichText
-      v-if="property.isGetContent && isChange"
+      v-if="property.isGetContent"
       ref="richText"
       v-model="data.title_con"
       :inline="true"
@@ -22,7 +22,7 @@
       <el-table-column fixed prop="con" label="内容" width="200">
         <template slot-scope="scope">
           <RichText
-            v-if="property.isGetContent && isChange"
+            v-if="property.isGetContent"
             ref="richText"
             v-model="scope.row.con"
             :inline="true"
@@ -38,7 +38,7 @@
       <el-table-column v-if="isEnable(data.property.view_pinyin)" prop="con" label="拼音" width="150">
         <template slot-scope="scope">
           <RichText
-            v-if="property.isGetContent && isChange"
+            v-if="property.isGetContent"
             ref="richText"
             v-model="scope.row.pinyin"
             :inline="true"
@@ -52,7 +52,7 @@
       <el-table-column prop="interpret" label="翻译" width="200">
         <template slot-scope="scope">
           <RichText
-            v-if="property.isGetContent && isChange"
+            v-if="property.isGetContent"
             ref="richText"
             v-model="scope.row.interpret"
             :inline="true"
@@ -66,7 +66,7 @@
       <el-table-column prop="note" label="注释" width="200">
         <template slot-scope="scope">
           <RichText
-            v-if="property.isGetContent && isChange"
+            v-if="property.isGetContent"
             ref="richText"
             v-model="scope.row.note"
             :inline="true"
@@ -149,7 +149,6 @@ export default {
       data: this.dataNotes,
       pinyinPositionLists,
       isEnable,
-      isChange: true,
     };
   },
   watch: {
@@ -163,18 +162,6 @@ export default {
       },
       deep: true,
     },
-    'data.unified_attrib': {
-      handler(val) {
-        if (val) {
-          this.isChange = false;
-          setTimeout(() => {
-            this.isChange = true;
-          }, 10);
-        }
-      },
-      deep: true,
-      immediate: true,
-    },
   },
   methods: {
     // 删除行

+ 5 - 18
src/views/book/courseware/create/components/question/new_word/NewWord.vue

@@ -257,7 +257,7 @@
           </div>
           <div class="table-item" style="width: 110px">
             <RichText
-              v-if="property.isGetContent && isChange"
+              v-if="property.isGetContent"
               ref="richText"
               v-model="item.cixing"
               :inline="true"
@@ -278,7 +278,7 @@
           </div>
           <div class="table-item" style="width: 200px">
             <RichText
-              v-if="property.isGetContent && isChange"
+              v-if="property.isGetContent"
               ref="richText"
               v-model="item.definition_list"
               :inline="true"
@@ -291,7 +291,7 @@
           </div>
           <div class="table-item" style="width: 200px">
             <RichText
-              v-if="property.isGetContent && isChange"
+              v-if="property.isGetContent"
               ref="richText"
               v-model="item.collocation"
               :inline="true"
@@ -303,7 +303,7 @@
           </div>
           <div class="table-item" style="width: 300px">
             <RichText
-              v-if="property.isGetContent && isChange"
+              v-if="property.isGetContent"
               ref="richText"
               v-model="item.liju_list"
               :font-size="data?.unified_attrib?.font_size"
@@ -322,7 +322,7 @@
           </div>
           <div class="table-item" style="width: 200px" v-for="(itemN, indexN) in data.addCol" :key="indexN">
             <RichText
-              v-if="property.isGetContent && isChange"
+              v-if="property.isGetContent"
               ref="richText"
               v-model="item[itemN.key]"
               :inline="true"
@@ -477,23 +477,10 @@ export default {
       visible: false,
       subtitleList: [],
       autoLoading: false,
-      isChange: true,
     };
   },
   watch: {
     'data.new_word_list': 'handleMindMap',
-    'data.unified_attrib': {
-      handler(val) {
-        if (val) {
-          this.isChange = false;
-          setTimeout(() => {
-            this.isChange = true;
-          }, 10);
-        }
-      },
-      deep: true,
-      immediate: true,
-    },
   },
   created() {
     this.getBookChapterStructExpandList();

+ 4 - 17
src/views/book/courseware/create/components/question/notes/Notes.vue

@@ -21,7 +21,7 @@
         <el-table-column fixed prop="con" label="内容" width="200">
           <template slot-scope="scope">
             <RichText
-              v-if="property.isGetContent && isChange"
+              v-if="property.isGetContent"
               ref="richText"
               v-model="scope.row.con"
               :inline="true"
@@ -38,7 +38,7 @@
         <el-table-column v-if="isEnable(data.property.view_pinyin)" prop="con" label="拼音" width="150">
           <template slot-scope="scope">
             <RichText
-              v-if="property.isGetContent && isChange"
+              v-if="property.isGetContent"
               ref="richText"
               v-model="scope.row.pinyin"
               :inline="true"
@@ -53,7 +53,7 @@
         <el-table-column prop="interpret" label="翻译" width="200">
           <template slot-scope="scope">
             <RichText
-              v-if="property.isGetContent && isChange"
+              v-if="property.isGetContent"
               ref="richText"
               v-model="scope.row.interpret"
               :inline="true"
@@ -68,7 +68,7 @@
         <el-table-column prop="note" label="注释" width="200">
           <template slot-scope="scope">
             <RichText
-              v-if="property.isGetContent && isChange"
+              v-if="property.isGetContent"
               ref="richText"
               v-model="scope.row.note"
               :inline="true"
@@ -130,7 +130,6 @@ export default {
       data: getNotesData(),
       multilingualText: '',
       refreshKey: '',
-      isChange: true,
     };
   },
   watch: {
@@ -146,18 +145,6 @@ export default {
       },
       deep: true,
     },
-    'data.unified_attrib': {
-      handler(val) {
-        if (val) {
-          this.isChange = false;
-          setTimeout(() => {
-            this.isChange = true;
-          }, 10);
-        }
-      },
-      deep: true,
-      immediate: true,
-    },
   },
   methods: {
     // 删除行

+ 1 - 14
src/views/book/courseware/create/components/question/table/Table.vue

@@ -65,7 +65,7 @@
           <div v-for="li in item" :key="li.mark" class="table-item">
             <!-- eslint-disable max-len -->
             <RichText
-              v-if="property.isGetContent && isChange"
+              v-if="property.isGetContent"
               ref="richText"
               v-model="li.content"
               :font-size="data?.unified_attrib?.font_size"
@@ -178,7 +178,6 @@ export default {
       isViewExplanatoryNoteDialog: false,
       oldRichData: {},
       fillTypeList,
-      isChange: true,
     };
   },
   watch: {
@@ -280,18 +279,6 @@ export default {
           });
       },
     },
-    'data.unified_attrib': {
-      handler(val) {
-        if (val) {
-          this.isChange = false;
-          setTimeout(() => {
-            this.isChange = true;
-          }, 10);
-        }
-      },
-      deep: true,
-      immediate: true,
-    },
   },
   methods: {
     // 识别文本