Browse Source

优化标签多语言细节

zq 4 days ago
parent
commit
2042f53741

+ 0 - 1
src/icons/svg/lang.svg

@@ -1 +0,0 @@
-<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755247006124" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10088" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M916.48 977.92l-35.84-102.4h-168.96l-35.84 102.4h-107.52l163.84-430.08h122.88l163.84 430.08h-102.4z m-117.76-337.92l-61.44 158.72h122.88l-61.44-158.72zM527.36 798.72l46.08-107.52c-15.36-10.24-30.72-20.48-40.96-30.72 76.8-87.04 138.24-194.56 184.32-322.56h138.24v-102.4H465.92l76.8-25.6c-10.24-35.84-35.84-92.16-61.44-138.24l-112.64 35.84c20.48 40.96 40.96 92.16 51.2 128H40.96v102.4h143.36c46.08 128 112.64 235.52 189.44 322.56C281.6 732.16 163.84 783.36 25.6 819.2c20.48 25.6 51.2 76.8 66.56 102.4 143.36-40.96 266.24-102.4 363.52-184.32 20.48 20.48 46.08 40.96 71.68 61.44z m-235.52-460.8h307.2c-35.84 97.28-87.04 179.2-148.48 250.88-66.56-71.68-122.88-153.6-158.72-250.88z" p-id="10089"></path></svg>

+ 2 - 1
src/views/book/courseware/create/components/base/label/Label.vue

@@ -40,7 +40,7 @@
               :style="{ color: editLanguage ? '#165dff' : '' }"
               @click="editCommonTagsLanguage"
             >
-              <SvgIcon icon-class="lang" size="14" />设置多语言
+              <SvgIcon icon-class="multilingual" size="14" />设置多语言
             </span>
           </div>
           <div class="right-area">
@@ -221,6 +221,7 @@ export default {
           mult_language_list: this.commonTags[index].mult_language_list || [],
         });
       }
+      console.info(1, this.data.dynamicTags);
     },
     // 得到标签列表
     getLabelList() {

+ 9 - 5
src/views/book/courseware/preview/components/label/LabelPreview.vue

@@ -2,9 +2,14 @@
   <div class="label-preview" :style="getAreaStyle()">
     <SerialNumberPosition v-if="isEnable(data.property.sn_display_mode)" :property="data.property" />
     <div class="main">
-      <el-tag v-for="(tag, i) in data.dynamicTags" :key="i" :style="{ color: tag.color }">
-        <!-- {{ tag.name }} -->
-        {{ tag.mult_language_list?.find((item) => item.type === getLang())?.name }}
+      <el-tag v-for="(tag, i) in data.dynamicTags" :key="i" size="medium" :style="{ color: tag.color }">
+        <span v-if="'ZH' == getLang()">
+          {{ tag.name }}
+        </span>
+        <span v-else style="display: flex; flex-direction: column; line-height: 20px">
+          <span>{{ tag.name }}</span>
+          <span style="color: black">{{ tag.mult_language_list?.find((item) => item.type === getLang())?.name }}</span>
+        </span>
       </el-tag>
     </div>
   </div>
@@ -38,9 +43,8 @@ export default {
     gap: 8px;
 
     :deep .el-tag {
-      height: 32px;
+      height: auto;
       padding: 0 10px;
-      line-height: 30px;
       color: var(--color1);
       background-color: #fff;
       border-color: var(--color1);