ソースを参照

注释、上传、书写组件统一主题色

natasha 2 週間 前
コミット
35379db7a2

+ 8 - 2
src/views/book/courseware/preview/components/new_word/components/Strockplayredline.vue

@@ -2,7 +2,13 @@
 <template>
   <div class="strockplay-redInner">
     <div v-if="playStorkes" :class="['strock-play-box']" @click="playHanzi">
-      <SvgIcon icon-class="hanzi-strock-play" class="strock-play-btn" />
+      <SvgIcon
+        icon-class="hanzi-strock-play"
+        class="strock-play-btn"
+        :style="{
+          color: attrib && attrib.topic_color ? attrib.topic_color : '',
+        }"
+      />
     </div>
     <div class="character-target-box">
       <SvgIcon icon-class="hanzi-writer-bg" class="character-target-bg" />
@@ -16,7 +22,7 @@ import { GetStaticResources } from '@/api/app';
 const HanziWriter = require('hanzi-writer');
 export default {
   components: {},
-  props: ['targetDiv', 'Book_text', 'playStorkes', 'strokeColor', 'wordNum', 'themeColor'],
+  props: ['targetDiv', 'Book_text', 'playStorkes', 'strokeColor', 'wordNum', 'attrib'],
   data() {
     return {
       writer: null,

+ 11 - 1
src/views/book/courseware/preview/components/new_word/components/WordPhraseDetail.vue

@@ -39,6 +39,9 @@
               'bwc-Strockplay',
               themeColor == 'green' ? 'green-border' : themeColor == 'red' ? 'red-border' : 'brown-border',
             ]"
+            :style="{
+              borderColor: attrib && attrib.topic_color ? attrib.topic_color : '',
+            }"
           >
             <div v-for="(conItem, conindex) in data.new_word_str" :key="'new_word_' + conindex" class="strockplay">
               <Strockplayredline
@@ -47,11 +50,14 @@
                 :play-storkes="true"
                 :target-div="'bwcHanziIntp' + conItem + conindex"
                 :word-num="data.new_word_str.length"
-                :theme-color="themeColor"
+                :attrib="attrib"
               />
               <div
                 v-if="conindex < data.new_word_str.length - 1"
                 :class="['bwc-line', themeColor == 'green' ? 'green-bg' : themeColor == 'red' ? 'red-bg' : 'brown-bg']"
+                :style="{
+                  background: attrib && attrib.topic_color ? attrib.topic_color : '',
+                }"
               ></div>
             </div>
           </div>
@@ -61,6 +67,9 @@
               'bwc-tolength',
               themeColor == 'green' ? 'green-border' : themeColor == 'red' ? 'red-border' : 'brown-border',
             ]"
+            :style="{
+              borderColor: attrib && attrib.topic_color ? attrib.topic_color : '',
+            }"
           >
             <span v-for="(item, index) in data.new_word_str" :key="index">{{ item }}</span>
           </p>
@@ -178,6 +187,7 @@ export default {
     'type',
     'bg',
     'ed',
+    'attrib',
   ],
   data() {
     // 这里存放数据

+ 3 - 3
src/views/book/courseware/preview/components/notes/NotesPreview.vue

@@ -259,15 +259,15 @@ export default {
         cursor: pointer;
 
         &-text {
-          font-size: 14px;
+          font-size: 16px;
           font-weight: normal;
           line-height: 16px;
           color: #fff;
         }
 
         img {
-          width: 16px;
-          height: 16px;
+          width: 20px;
+          height: 20px;
           margin-left: 4px;
         }
       }

+ 28 - 6
src/views/book/courseware/preview/components/upload_preview/UploadPreviewPreview.vue

@@ -25,6 +25,12 @@
             :key="index"
             :class="[index === active_index ? 'active' : '']"
             @click="active_index = index"
+            :style="{
+              color:
+                index === active_index && data.unified_attrib && data.unified_attrib.topic_color
+                  ? data.unified_attrib.topic_color
+                  : '',
+            }"
             >{{ label }}</span
           >
         </div>
@@ -32,9 +38,15 @@
           <li v-for="(file, i) in source_list[active_index]" :key="i">
             <div class="file-name">
               <span>
-                <SvgIcon :icon-class="icon_list[active_index]" size="16" />
+                <SvgIcon :icon-class="icon_list[active_index]" size="24" />
                 <p>
-                  <span>{{ data.file_info[file.file_id].xuhao + data.file_info[file.file_id].file_name }} </span
+                  <span
+                    :style="{
+                      fontSize:
+                        data.unified_attrib && data.unified_attrib.font_size ? data.unified_attrib.font_size : '',
+                      fontFamily: data.unified_attrib && data.unified_attrib.font ? data.unified_attrib.font : '',
+                    }"
+                    >{{ data.file_info[file.file_id].xuhao + data.file_info[file.file_id].file_name }} </span
                   ><span
                     >{{
                       multilingualTextList[getLang()] && multilingualTextList[getLang()][i]
@@ -44,10 +56,11 @@
                   </span>
                 </p>
               </span>
-              <SvgIcon v-show="file.file_id" icon-class="uploadPreview" size="16" @click="viewDialog(file)" />
+              <SvgIcon v-show="file.file_id" icon-class="uploadPreview" size="24" @click="viewDialog(file)" />
+
               <img
-                v-if="isEnable(data.is_enable_download)"
-                style="width: 16px; height: 16px"
+                v-if="isEnable(data.property.is_enable_download)"
+                style="width: 24px; height: 24px; cursor: pointer"
                 src="@/assets/download.png"
                 alt="download"
                 @click="downLoad(file)"
@@ -55,7 +68,16 @@
             </div>
           </li>
         </ul>
-        <p v-else class="label-tips">暂无本类型文件,看看其他类型吧</p>
+        <p
+          v-else
+          class="label-tips"
+          :style="{
+            fontSize: data.unified_attrib && data.unified_attrib.font_size ? data.unified_attrib.font_size : '',
+            fontFamily: data.unified_attrib && data.unified_attrib.font ? data.unified_attrib.font : '',
+          }"
+        >
+          暂无本类型文件,看看其他类型吧
+        </p>
       </template>
     </div>
     <el-dialog

+ 2 - 2
src/views/book/courseware/preview/components/write_base/WriteBasePreview.vue

@@ -17,8 +17,8 @@
           :bg-color.sync="bgColor"
         />
         <div class="btn-box">
-          <SvgIcon icon-class="clear" size="16" title="清除" @click="handleReset" />
-          <SvgIcon icon-class="camera" size="16" title="保存" @click="handleGenerate" />
+          <SvgIcon icon-class="clear" size="24" title="清除" @click="handleReset" />
+          <SvgIcon icon-class="camera" size="24" title="保存" @click="handleGenerate" />
         </div>
       </div>
       <template v-if="data.write_base64[0]">