Explorar o código

解决更换字号大小第一行不更新问题

natasha hai 1 ano
pai
achega
dfe5970533

+ 12 - 12
src/components/corpus/StrockplayredlineTable.vue

@@ -80,18 +80,18 @@ export default {
       // 深度观察监听
       deep: true,
     },
-    fontSize: {
-      handler: function (val, oldVal) {
-        if (val != oldVal) {
-          let _this = this;
-          _this.$nextTick(() => {
-            _this.initHanziwrite();
-          });
-        }
-      },
-      // 深度观察监听
-      deep: true,
-    },
+    // fontSize: {
+    //   handler: function (val, oldVal) {
+    //     if (val != oldVal) {
+    //       let _this = this;
+    //       _this.$nextTick(() => {
+    //         _this.initHanziwrite();
+    //       });
+    //     }
+    //   },
+    //   // 深度观察监听
+    //   deep: true,
+    // },
   },
   //方法集合
   methods: {

+ 12 - 12
src/components/corpus/Strockred.vue

@@ -53,18 +53,18 @@ export default {
       // 深度观察监听
       deep: true,
     },
-    fontSize: {
-      handler: function (val, oldVal) {
-        if (val != oldVal) {
-          let _this = this;
-          _this.$nextTick(() => {
-            _this.initHanziwrite();
-          });
-        }
-      },
-      // 深度观察监听
-      deep: true,
-    },
+    // fontSize: {
+    //   handler: function (val, oldVal) {
+    //     if (val != oldVal) {
+    //       let _this = this;
+    //       _this.$nextTick(() => {
+    //         _this.initHanziwrite();
+    //       });
+    //     }
+    //   },
+    //   // 深度观察监听
+    //   deep: true,
+    // },
   },
   //方法集合
   methods: {

+ 1 - 1
src/views/wordcard/cread.vue

@@ -124,7 +124,7 @@
       </div>
       <div
         class="word_main"
-        v-if="writeTableData && writeTableData.result"
+        v-if="writeTableData && writeTableData.result && !loading"
         :style="{ justifyContent: writeTableData.result.length === 1 ? 'center' : 'space-between' }"
       >
         <div class="word_main_table" v-for="(itemT, indexT) in writeTableData.result" :key="indexT">

+ 6 - 6
src/views/wordcard/writeTable.vue

@@ -100,7 +100,7 @@
                 <AudioPlay :file-id="audio_file" v-if="audio_file" />
                 <span v-if="dataConfig.wordPinyin">{{ data.pinyin }}</span>
               </p>
-              <div class="hz-box" :style="{ margin: '8px auto' }">
+              <div class="hz-box" :style="{ margin: '0 auto 4px auto' }">
                 <Strockplay
                   className="adult-strockplay"
                   :strokePlayColor="dataConfig.borderColor"
@@ -138,14 +138,14 @@
       <div
         class="writeTop-row"
         v-for="(itemR, indexR) in data.list"
-        :key="indexR"
+        :key="'writeTop-' + indexR"
         :style="{ marginBottom: dataConfig.marginBottom }"
       >
         <div
           class="writeTop-item"
           :class="[indexI !== 0 ? 'writeTop-item-noLeft' : '']"
           v-for="(itemI, indexI) in itemR"
-          :key="indexI"
+          :key="'writeTop-item' + indexI"
           :style="{
             width: dataConfig.width,
             height: dataConfig.width,
@@ -154,7 +154,7 @@
         >
           <template v-if="itemI && itemI.con && !itemI.write && !itemI.answer && !itemI.miaoRed">
             <Strockplay
-              v-if="'writeTop-item-' + pageNumber + '-' + indexR + '-' + indexI + type + fontSize"
+              v-if="'writeTop-item-' + pageNumber + '-' + indexI + type"
               className="adult-strockplay"
               :strokePlayColor="dataConfig.borderColor"
               :Book_text="itemI.con"
@@ -183,7 +183,7 @@
           </template>
           <template v-else-if="itemI && itemI.miaoRed">
             <Strockred
-              v-if="'write-item-' + pageNumber + '-' + indexR + '-' + indexI + type"
+              v-if="'write-item-' + pageNumber + '-' + indexI + type"
               className="adult-strockplay"
               :strokePlayColor="dataConfig.borderColor"
               :Book_text="itemI.con"
@@ -440,7 +440,7 @@ export default {
   .item-info {
     display: flex;
     width: 100%;
-    padding: 16px 46px;
+    padding: 0 46px 8px 46px;
     column-gap: 16px;
     box-sizing: border-box;
     &-left {