Explorar el Código

修改对齐 语料库header搜索bug

qinpeng hace 2 años
padre
commit
c7a6468beb
Se han modificado 1 ficheros con 18 adiciones y 12 borrados
  1. 18 12
      src/views/corpus/Result.vue

+ 18 - 12
src/views/corpus/Result.vue

@@ -5,7 +5,7 @@
       :seekShow="true"
       :seekOption="false"
       :seekOptions="true"
-      @changehzdata="changehzdata"
+      @changehzdata="getdata(true)"
     />
     <div class="main">
       <div class="hanzi_list">
@@ -465,7 +465,9 @@ export default {
       } else {
         this.rightList = this.allList.stat_list_word_definition;
       }
-      this.inityuan();
+      if (this.rightList.length > 0) {
+        this.inityuan();
+      }
     },
     updownHz() {
       this.unfold = !this.unfold;
@@ -649,11 +651,15 @@ export default {
             stat_list_sentence_source_book: res.stat_list_sentence_source_book,
             stat_list_word_definition: res.stat_list_word_definition,
           };
-          // 清理脏数据
-          this.removeRubbishData(res);
-          this.rightList = res.stat_list_sentence_source_book;
-          this.getrightListdata();
+
           if (res.sentence_list.length > 0) {
+            res.stat_list_word_definition.forEach((item) => {
+              item.book_name = item.definition;
+            });
+            // 清理脏数据
+            this.removeRubbishData(res);
+            this.rightList = res.stat_list_sentence_source_book;
+            this.getrightListdata();
             this.allList.sentence_list = this.handleExample(res.sentence_list);
             this.allList.sentence_list_sort_left = this.handleExample(
               res.sentence_list_sort_left,
@@ -667,12 +673,12 @@ export default {
               res.sentence_list_sort_right,
               "right"
             );
-          }
 
-          this.CurrentList = JSON.parse(
-            JSON.stringify(this.allList.sentence_list)
-          );
-          this.padingEvetn();
+            this.CurrentList = JSON.parse(
+              JSON.stringify(this.allList.sentence_list)
+            );
+            this.padingEvetn();
+          }
           if (this.$route.query.keyword && flag) {
             this.changehzdata();
           } else {
@@ -1210,7 +1216,7 @@ export default {
               .words {
                 // display: flex;
                 // align-items: flex-end;
-                // flex: 1;
+                flex: 1;
                 // flex-flow: wrap;
                 > div {
                   .pinyin {