Bladeren bron

字词卡片显示字词

natasha 7 maanden geleden
bovenliggende
commit
88ef537c97
2 gewijzigde bestanden met toevoegingen van 23 en 29 verwijderingen
  1. 21 24
      src/views/wordcard/printNew.vue
  2. 2 5
      src/views/wordcard/writeTableNew.vue

+ 21 - 24
src/views/wordcard/printNew.vue

@@ -35,10 +35,7 @@
               fit="contain"
               fit="contain"
             />
             />
           </div>
           </div>
-          <h2
-            :class="['con-preview', data.left.fileList.length === 0 ? 'con-preview-big' : '']"
-            v-if="data.left.con && data.left.fileList.length === 0"
-          >
+          <h2 :class="['con-preview', data.left.fileList.length === 0 ? 'con-preview-big' : '']" v-if="data.left.con">
             {{ data.left.con }}
             {{ data.left.con }}
           </h2>
           </h2>
         </div>
         </div>
@@ -251,26 +248,26 @@ export default {
     let writeTableData = localStorage.getItem('newEditTable');
     let writeTableData = localStorage.getItem('newEditTable');
     if (writeTableData) {
     if (writeTableData) {
       _this.dataConfig = JSON.parse(writeTableData);
       _this.dataConfig = JSON.parse(writeTableData);
-      if (_this.dataConfig) {
-        _this.dataConfig.forEach((item) => {
-          if (item.left.con.trim()) {
-            let MethodName = 'tool-TextToVoiceFile';
-            let datas = {
-              text: item.left.con.trim(),
-            };
-            getLogin(MethodName, datas)
-              .then((res) => {
-                if (res.status === 1) {
-                  item.right.audio_file = res.file_id;
-                }
-              })
-              .catch(() => {});
-          }
-        });
-        // _this.$nextTick(() => {
-        // _this.initHanziwrite();
-        // });
-      }
+      // if (_this.dataConfig) {
+      //   _this.dataConfig.forEach((item) => {
+      //     if (item.left.con.trim()) {
+      //       let MethodName = 'tool-TextToVoiceFile';
+      //       let datas = {
+      //         text: item.left.con.trim(),
+      //       };
+      //       getLogin(MethodName, datas)
+      //         .then((res) => {
+      //           if (res.status === 1) {
+      //             item.right.audio_file = res.file_id;
+      //           }
+      //         })
+      //         .catch(() => {});
+      //     }
+      //   });
+      //   // _this.$nextTick(() => {
+      //   // _this.initHanziwrite();
+      //   // });
+      // }
       setTimeout(() => {
       setTimeout(() => {
         _this.download2();
         _this.download2();
       }, 2000);
       }, 2000);

+ 2 - 5
src/views/wordcard/writeTableNew.vue

@@ -99,10 +99,7 @@
               fit="contain"
               fit="contain"
             />
             />
           </div>
           </div>
-          <h2
-            :class="['con-preview', data.left.fileList.length === 0 ? 'con-preview-big' : '']"
-            v-if="data.left.con && data.left.fileList.length === 0"
-          >
+          <h2 :class="['con-preview', data.left.fileList.length === 0 ? 'con-preview-big' : '']" v-if="data.left.con">
             {{ data.left.con }}
             {{ data.left.con }}
           </h2>
           </h2>
           <a class="overturn-btn" v-if="isPreview" @click="changeShowLeft"><i class="el-icon-refresh"></i></a>
           <a class="overturn-btn" v-if="isPreview" @click="changeShowLeft"><i class="el-icon-refresh"></i></a>
@@ -419,7 +416,7 @@ export default {
     width: 600px;
     width: 600px;
   }
   }
   .writeTop {
   .writeTop {
-    min-height: 450px;
+    min-height: 530px;
     display: flex;
     display: flex;
     column-gap: 8px;
     column-gap: 8px;
     perspective: 1000px;
     perspective: 1000px;