Kaynağa Gözat

排序题重置正确答案

natasha 2 yıl önce
ebeveyn
işleme
2aed7f7c85

+ 4 - 1
src/components/Adult/common/SentenceSegwordChs/index.vue

@@ -46,7 +46,9 @@ export default {
     "segModel",
     "isShowlabel",
     "name",
-    "type"
+    "type",
+    "handlecorrectList",
+    "itemIndex"
   ],
   data() {
     return {
@@ -100,6 +102,7 @@ export default {
           this.segList = list;
           this.isByWord = true;
           this.setWordsList(list);
+          this.$emit("handlecorrectList",this.itemIndex)
         });
       }
     },

+ 4 - 1
src/components/Adult/inputModules/Sort.vue

@@ -37,7 +37,7 @@
             ></el-input>
         </div>
         <div class="NPC-sentence-Segword" style="position: relative">
-          <SentenceSegwordChs :curQue="item.detail" :type="type" />
+          <SentenceSegwordChs :curQue="item.detail" :type="type" @handlecorrectList="handlecorrectList" :itemIndex="index" />
           <img
             style="position: absolute; right: 202px;top: 0;"
             @click="deleteOption(index)"
@@ -183,6 +183,9 @@ export default {
       let obj = JSON.parse(JSON.stringify(this.data_structure.option[0]));
       this.curQue.option.push(obj);
     },
+    handlecorrectList(index){
+        this.curQue.option[index].correctWordsList = []
+    }
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {