Преглед на файлове

修改对话答题segbyword

gcj преди 2 години
родител
ревизия
6d38595f91
променени са 1 файла, в които са добавени 10 реда и са изтрити 1 реда
  1. 10 1
      src/components/Adult/inputModules/DialogueTem/components/SegbywordChs.vue

+ 10 - 1
src/components/Adult/inputModules/DialogueTem/components/SegbywordChs.vue

@@ -1,6 +1,6 @@
 <!-- 分句组件 -->
 <template>
-  <div class="Big-Book-Maxwidth">
+  <div class="Big-Book-Maxwidth" v-if="refresh">
     <div class="Big-Book-con-top">
       <span class="Big-Book-left-text">分词结果:</span>
     </div>
@@ -158,14 +158,23 @@ export default {
         ["Ū", "Ú", "Û", "Ù"],
       ],
       wordsListLeg: 0,
+      refresh: true,
     };
   },
   computed: {},
   watch: {
     curQue: {
       handler: function (newVal, oldVal) {
+        let _this = this;
+        _this.refresh = false;
         if (newVal != oldVal) {
           this.getParaSegWordsResult();
+          _this.$nextTick(() => {
+            // 重新渲染组件
+            _this.refresh = true;
+          });
+        } else {
+          _this.refresh = true;
         }
       },
       deep: true,