فهرست منبع

文字颜色和输入颜色

natasha 1 ماه پیش
والد
کامیت
faa501d6ac

+ 3 - 2
src/views/book/courseware/preview/components/image_text/ImageTextPreview.vue

@@ -58,7 +58,6 @@
             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('请输入')"
         />
@@ -383,7 +382,9 @@ export default {
 
     // font-size: 16px;
     line-height: 1;
-    color: #000;
+
+    // color: #000;
+    color: var(--input-color);
     text-align: center;
     resize: none;
     background: transparent;

+ 32 - 11
src/views/book/courseware/preview/components/pinyin_base/PinyinBasePreview.vue

@@ -34,6 +34,10 @@
                 v-for="(itemc, indexc) in con_preview"
                 :key="indexc"
                 :class="['item-con', isJudgingRightWrong && itemc.type === 'input' ? itemc.is_right : '']"
+                :style="{
+                  color:
+                    data.unified_attrib && data.unified_attrib.text_color ? data.unified_attrib.text_color : '#000',
+                }"
               >
                 <el-input
                   v-if="itemc.type === 'input'"
@@ -48,10 +52,6 @@
                         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"
@@ -62,7 +62,15 @@
             </template>
             <template v-else-if="data.property.answer_mode === 'select'">
               <template v-if="data.property.fun_type === 'show'">
-                <span v-for="(itemc, indexc) in data.matically_pinyin_str[data.mark]" :key="indexc" class="items-box">
+                <span
+                  v-for="(itemc, indexc) in data.matically_pinyin_str[data.mark]"
+                  :key="indexc"
+                  class="items-box"
+                  :style="{
+                    color:
+                      data.unified_attrib && data.unified_attrib.text_color ? data.unified_attrib.text_color : '#000',
+                  }"
+                >
                   <span v-for="(itemi, indexi) in itemc" :key="indexi" :class="['items-con']">{{ itemi }}</span>
                 </span>
               </template>
@@ -80,6 +88,10 @@
                       : '',
                     data.property.fun_type === 'show' ? 'item-con-in' : '',
                   ]"
+                  :style="{
+                    color:
+                      data.unified_attrib && data.unified_attrib.text_color ? data.unified_attrib.text_color : '#000',
+                  }"
                   @click="
                     if (data.property.fun_type === 'show') return;
                     con_preview[0].item_active_index = indexc;
@@ -96,6 +108,10 @@
                   v-for="(itemi, indexi) in itemc"
                   :key="indexi"
                   :class="['items-con', active_index_str === 0 + '-' + indexc + '-' + indexi ? 'active' : '']"
+                  :style="{
+                    color:
+                      data.unified_attrib && data.unified_attrib.text_color ? data.unified_attrib.text_color : '#000',
+                  }"
                   @click="handleSelectItemTone(0, indexc, indexi, con_preview[0].item_con_yuan[indexc][indexi])"
                   >{{ itemi }}</span
                 >
@@ -197,6 +213,7 @@
                 :style="{
                   fontSize:
                     data.unified_attrib && data.unified_attrib.pinyin_size ? data.unified_attrib.pinyin_size : '',
+                  color: data.unified_attrib && data.unified_attrib.text_color ? data.unified_attrib.text_color : '',
                 }"
               >
                 <span v-if="data.content_hz" class="items-hz">{{ convertText(data.content_hz) }}</span>
@@ -222,10 +239,6 @@
                             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"
@@ -273,6 +286,12 @@
                       v-for="(itemi, indexi) in itemc"
                       :key="indexi"
                       :class="['items-con', active_index_str_right === 0 + '-' + indexc + '-' + indexi ? 'active' : '']"
+                      :style="{
+                        color:
+                          data.unified_attrib && data.unified_attrib.text_color
+                            ? data.unified_attrib.text_color
+                            : '#000',
+                      }"
                       @click="
                         handleSelectItemTone(0, indexc, indexi, con_preview_right[0].item_con_yuan[indexc][indexi])
                       "
@@ -898,7 +917,7 @@ export default {
     font-family: 'League';
 
     // font-weight: 500;
-    color: #000;
+    // color: #000;
     cursor: pointer;
 
     &.right {
@@ -965,7 +984,9 @@ export default {
     :deep .el-input__inner {
       padding: 0;
       font-family: 'League';
-      color: '#000';
+
+      // color: '#000';
+      color: var(--input-color);
 
       // font-size: 16px;
       text-align: center;