Ver Fonte

表格输入高度及输入内容与文字对齐

natasha há 3 semanas atrás
pai
commit
0fe4a8b4a0

+ 14 - 2
src/views/book/courseware/preview/components/table/TablePreview.vue

@@ -96,7 +96,12 @@
                                 </span>
                                 </span>
                               </span>
                               </span>
                               <template v-else-if="word.type === 'input'">
                               <template v-else-if="word.type === 'input'">
-                                <span v-if="data.property.pinyin_position === 'top'" class="pinyin">&nbsp;</span>
+                                <span
+                                  v-if="data.property.pinyin_position === 'top'"
+                                  class="pinyin"
+                                  :style="getPinyinStyle(word)"
+                                  >&nbsp;</span
+                                >
                                 <template v-if="data.property.fill_type === fillTypeList[0].value">
                                 <template v-if="data.property.fill_type === fillTypeList[0].value">
                                   <el-input
                                   <el-input
                                     :key="index"
                                     :key="index"
@@ -153,7 +158,12 @@
                                     @handleWav="handleMiniWav($event, word)"
                                     @handleWav="handleMiniWav($event, word)"
                                   />
                                   />
                                 </template>
                                 </template>
-                                <span v-if="data.property.pinyin_position === 'bottom'" class="pinyin">&nbsp;</span>
+                                <span
+                                  v-if="data.property.pinyin_position === 'bottom'"
+                                  class="pinyin"
+                                  :style="getPinyinStyle(word)"
+                                  >&nbsp;</span
+                                >
                               </template>
                               </template>
                             </span>
                             </span>
                           </span>
                           </span>
@@ -1484,8 +1494,10 @@ $border-color: #e6e6e6;
         }
         }
 
 
         :deep input.el-input__inner {
         :deep input.el-input__inner {
+          height: 100%;
           padding: 0;
           padding: 0;
           font-family: var(--input-font-family);
           font-family: var(--input-font-family);
+          line-height: 1;
 
 
           // font-size: 16pt;
           // font-size: 16pt;
           color: $font-color;
           color: $font-color;