dsy 4 هفته پیش
والد
کامیت
66867600c4

+ 13 - 1
src/views/book/courseware/preview/components/fill/FillPreview.vue

@@ -31,7 +31,7 @@
               </template>
 
               <template v-else-if="data.property.fill_type === fillTypeList[1].value">
-                <el-popover :key="j" placement="top" trigger="click">
+                <el-popover :key="j" placement="top" trigger="click" class="popper-list">
                   <div class="word-list">
                     <span
                       v-for="{ content, mark } in data.word_list"
@@ -436,6 +436,18 @@ export default {
         border-radius: 0;
       }
     }
+
+    .popper-list {
+      & + .right-answer {
+        position: relative;
+        left: -4px;
+        display: inline-block;
+        height: 32px;
+        line-height: 28px;
+        vertical-align: bottom;
+        border-bottom: 1px solid $font-color;
+      }
+    }
   }
 
   .record-box {

+ 2 - 0
src/views/book/courseware/preview/components/matching/MatchingPreview.vue

@@ -474,6 +474,8 @@ export default {
 .matching-preview {
   @include preview-base;
 
+  overflow: auto;
+
   .option-list {
     position: relative;
     display: flex;

+ 62 - 9
src/views/book/courseware/preview/components/new_word/NewWordPreview.vue

@@ -152,13 +152,23 @@
                         <span
                           v-if="data.property.pinyin_position == 'top'"
                           class="NPC-word-tab-common NPC-word-tab-pinyin"
-                          :style="{ width: data.col_width[0].value + 'px' }"
+                          :style="{
+                            width: data.col_width[0].value + 'px',
+                            fontSize:
+                              data.unified_attrib && data.unified_attrib.pinyin_size
+                                ? data.unified_attrib.pinyin_size
+                                : '',
+                          }"
                           v-html="sItem.pinyin"
                         >
                         </span>
 
                         <span
-                          :style="{ width: data.col_width[0].value + 'px' }"
+                          :style="{
+                            width: data.col_width[0].value + 'px',
+                            fontSize:
+                              data.unified_attrib && data.unified_attrib.font_size ? data.unified_attrib.font_size : '',
+                          }"
                           class="NPC-word-tab-common NPC-word-tab-word"
                           v-html="sItem.new_word"
                         >
@@ -166,7 +176,13 @@
                         <span
                           v-if="data.property.pinyin_position == 'bottom'"
                           class="NPC-word-tab-common NPC-word-tab-pinyin"
-                          :style="{ width: data.col_width[0].value + 'px' }"
+                          :style="{
+                            width: data.col_width[0].value + 'px',
+                            fontSize:
+                              data.unified_attrib && data.unified_attrib.pinyin_size
+                                ? data.unified_attrib.pinyin_size
+                                : '',
+                          }"
                           v-html="sItem.pinyin"
                         >
                         </span>
@@ -220,12 +236,33 @@
                       <span
                         v-if="!data.property.pinyin_position || data.property.pinyin_position == 'front'"
                         class="NPC-word-tab-common NPC-word-tab-pinyin"
-                        :style="{ width: data.col_width[1].value + 'px' }"
+                        :style="{
+                          width: data.col_width[1].value + 'px',
+                          fontSize:
+                            data.unified_attrib && data.unified_attrib.pinyin_size
+                              ? data.unified_attrib.pinyin_size
+                              : '',
+                          lineHeight:
+                            data.unified_attrib && data.unified_attrib.font_size
+                              ? data.unified_attrib.font_size.replace('pt', '') * 1.5 + 'pt'
+                              : '',
+                        }"
                         v-html="sItem.pinyin"
                       >
                       </span>
-                      <span :style="{ width: data.col_width[0].value + 'px' }">
-                        <p class="NPC-word-tab-common NPC-word-tab-word" v-html="sItem.new_word"></p>
+                      <span
+                        :style="{
+                          width: data.col_width[0].value + 'px',
+                        }"
+                      >
+                        <p
+                          class="NPC-word-tab-common NPC-word-tab-word"
+                          :style="{
+                            fontSize:
+                              data.unified_attrib && data.unified_attrib.font_size ? data.unified_attrib.font_size : '',
+                          }"
+                          v-html="sItem.new_word"
+                        ></p>
                         <span
                           v-if="
                             showLang &&
@@ -242,7 +279,17 @@
                       <span
                         v-if="data.property.pinyin_position == 'back'"
                         class="NPC-word-tab-common NPC-word-tab-pinyin"
-                        :style="{ width: data.col_width[1].value + 'px' }"
+                        :style="{
+                          width: data.col_width[1].value + 'px',
+                          fontSize:
+                            data.unified_attrib && data.unified_attrib.pinyin_size
+                              ? data.unified_attrib.pinyin_size
+                              : '',
+                          lineHeight:
+                            data.unified_attrib && data.unified_attrib.font_size
+                              ? data.unified_attrib.font_size.replace('pt', '') * 1.5 + 'pt'
+                              : '',
+                        }"
                         v-html="sItem.pinyin"
                       >
                       </span>
@@ -614,8 +661,14 @@ export default {
     data: {
       handler(val, oldVal) {
         if (val !== oldVal) {
-          if (this.is_change) return;
-          if (val && val.new_word_list[0].new_word) {
+          if (
+            (val &&
+              val.new_word_list[0].new_word &&
+              oldVal &&
+              oldVal.new_word_list[0].new_word &&
+              val.new_word_list[0].new_word !== oldVal.new_word_list[0].new_word) ||
+            (val && val.new_word_list[0].new_word && !oldVal)
+          ) {
             // this.wordShow = isEnable(this.data.property.is_word_show);
             this.initData();
           }