Преглед изворни кода

修改画板预览滚动条问题 图文和拼音组件字号大小

natasha пре 1 месец
родитељ
комит
e6720845d4

+ 1 - 1
src/views/book/courseware/create/components/question/drawing/Drawing.vue

@@ -54,7 +54,7 @@
           <div class="horizontal-line" @mousedown="dragStart($event, 'ns-resize', 'bottom')"></div>
           <div class="dot bottom-right" @mousedown="dragStart($event, 'nwse-resize', 'bottom-right')"></div>
         </div>
-        <p v-else :style="{ lineHeight: data.image_height + 'px', textAlign: 'center' }">背景图</p>
+        <p v-else :style="{ lineHeight: data.image_height + 'px', textAlign: 'center', margin: 0 }">背景图</p>
       </div>
     </template>
   </ModuleBase>

+ 4 - 0
src/views/book/courseware/preview/components/drawing/DrawingPreview.vue

@@ -314,4 +314,8 @@ export default {
     cursor: pointer;
   }
 }
+
+.footer {
+  height: 38px;
+}
 </style>

+ 8 - 1
src/views/book/courseware/preview/components/image_text/ImageTextPreview.vue

@@ -54,6 +54,12 @@
           :disabled="disabled"
           type="textarea"
           style="height: 100%"
+          :style="{
+            fontSize: data.unified_attrib && data.unified_attrib.font_size ? data.unified_attrib.font_size : '',
+            '--input-color':
+              data.unified_attrib && data.unified_attrib.text_color ? data.unified_attrib.text_color : '#1d2129',
+            color: data.unified_attrib && data.unified_attrib.text_color ? data.unified_attrib.text_color : '#1d2129',
+          }"
           :placeholder="convertText('请输入')"
         />
       </div>
@@ -374,7 +380,8 @@ export default {
     height: 100%;
     padding: 5px;
     font-family: 'League', '楷体';
-    font-size: 16px;
+
+    // font-size: 16px;
     line-height: 1;
     color: #000;
     text-align: center;

+ 39 - 7
src/views/book/courseware/preview/components/pinyin_base/PinyinBasePreview.vue

@@ -24,7 +24,7 @@
                 : '',
             ]"
             :style="{
-              fontSize: data.unified_attrib && data.unified_attrib.font_size ? data.unified_attrib.font_size : '',
+              fontSize: data.unified_attrib && data.unified_attrib.pinyin_size ? data.unified_attrib.pinyin_size : '',
             }"
           >
             <span v-if="data.content_hz" class="items-hz">{{ convertText(data.content_hz) }}</span>
@@ -39,7 +39,21 @@
                   v-if="itemc.type === 'input'"
                   v-model="itemc.con"
                   :disabled="disabled"
-                  :style="[{ width: Math.max(20, itemc.con.length * 10) + 'px' }]"
+                  :style="[
+                    {
+                      width: Math.max(20, itemc.con.length * 10) + 'px',
+                      fontSize:
+                        data.unified_attrib && data.unified_attrib.pinyin_size ? data.unified_attrib.pinyin_size : '',
+                      '--input-color':
+                        data.unified_attrib && data.unified_attrib.text_color
+                          ? data.unified_attrib.text_color
+                          : '#1d2129',
+                      color:
+                        data.unified_attrib && data.unified_attrib.text_color
+                          ? data.unified_attrib.text_color
+                          : '#1d2129',
+                    },
+                  ]"
                   class="item-input"
                   @blur="onInputChange(itemc)"
                 />
@@ -181,7 +195,8 @@
               <div
                 class="option-content"
                 :style="{
-                  fontSize: data.unified_attrib && data.unified_attrib.font_size ? data.unified_attrib.font_size : '',
+                  fontSize:
+                    data.unified_attrib && data.unified_attrib.pinyin_size ? data.unified_attrib.pinyin_size : '',
                 }"
               >
                 <span v-if="data.content_hz" class="items-hz">{{ convertText(data.content_hz) }}</span>
@@ -196,7 +211,23 @@
                       v-if="itemc.type === 'input'"
                       v-model="itemc.answer"
                       :disabled="true"
-                      :style="[{ width: Math.max(20, itemc.answer.length * 10) + 'px' }]"
+                      :style="[
+                        {
+                          width: Math.max(20, itemc.answer.length * 10) + 'px',
+                          fontSize:
+                            data.unified_attrib && data.unified_attrib.pinyin_size
+                              ? data.unified_attrib.pinyin_size
+                              : '',
+                          '--input-color':
+                            data.unified_attrib && data.unified_attrib.text_color
+                              ? data.unified_attrib.text_color
+                              : '#1d2129',
+                          color:
+                            data.unified_attrib && data.unified_attrib.text_color
+                              ? data.unified_attrib.text_color
+                              : '#1d2129',
+                        },
+                      ]"
                       class="item-input"
                     />
                     <span v-else>{{ itemc.con }}</span>
@@ -934,12 +965,13 @@ export default {
     :deep .el-input__inner {
       padding: 0;
       font-family: 'League';
-      font-size: 16px;
-      color: #1d2129;
+      color: '#000';
+
+      // font-size: 16px;
       text-align: center;
       background-color: transparent;
       border-width: 0;
-      border-bottom: 1px solid #1d2129;
+      border-bottom: 1px solid #000;
       border-radius: 0;
     }
   }