Browse Source

生词拼音位置

natasha 3 years ago
parent
commit
ccdd7ef1cc
2 changed files with 56 additions and 46 deletions
  1. 54 43
      src/components/Adult/Preview.vue
  2. 2 3
      src/components/Adult/preview/WordPhrase.vue

+ 54 - 43
src/components/Adult/Preview.vue

@@ -105,11 +105,13 @@
     </div>
     <div v-if="cur" class="NNPE-Book-content-inner">
       <div v-for="(item, index) in cur.cur_fn_data" :key="index">
-        <h2 v-if="item.z_title || item.number">
-          <b v-if="item.number">{{ item.number }}</b
-          >{{ item.z_title }}
-        </h2>
-        <h3 v-if="item.f_title" v-html="item.f_title"></h3>
+        <div class="title-box" v-if="item.number||item.z_title||item.f_title">
+            <b v-if="item.number">{{ item.number }}</b>
+            <div class="title-box-right">
+                <h2 v-if="item.z_title" v-html="item.z_title"></h2>
+                <h3 v-if="item.f_title" v-html="item.f_title" :style="{'marginTop':item.z_title?'8px':'0'}"></h3>
+            </div>
+        </div>
         <div
           :class="['NNPE-tableList', item.is_bg ? 'NNPE-tableList-hasBg' : '']"
         >
@@ -824,40 +826,45 @@ export default {
     padding: 0 40px;
     > div {
       padding-top: 32px;
-      > h2 {
-        color: #e35454;
-        font-size: 16px;
-        line-height: 150%;
-        font-weight: bold;
-        margin: 0;
-        b {
-          min-width: 48px;
-          height: 24px;
-          background: #e35454;
-          border-radius: 8px;
-          color: #ffffff;
-          font-family: "robot";
-          display: inline-block;
-          text-align: center;
-          font-size: 16px;
-          margin-right: 14px;
-          padding: 0 4px;
+      .title-box{
+          display: flex;
+          margin-bottom: 24px;
+          b {
+            min-width: 39px;
+            height: 24px;
+            background: #e35454;
+            border-radius: 8px;
+            color: #ffffff;
+            font-family: "robot";
+            display: inline-block;
+            text-align: center;
+            font-size: 16px;
+            line-height: 150%;
+            margin-right: 12px;
+            padding: 0 4px;
+          }
+          h2 {
+            color: #e35454;
+            font-size: 16px;
+            line-height: 150%;
+            font-weight: bold;
+            margin: 0;
+        }
+          h3 {
+            color: #000000;
+            font-size: 16px;
+            line-height: 150%;
+            font-weight: normal;
+            margin: 0;
+            white-space: pre-wrap;
+            word-break: break-word;
         }
       }
-      > h3 {
-        color: #000000;
-        font-size: 16px;
-        line-height: 150%;
-        font-weight: normal;
-        margin: 8px 0 0 0;
-        white-space: pre-wrap;
-        word-break: break-word;
-      }
+      
     }
     .NNPE-tableList {
       background: #fff;
       border-radius: 8px;
-      margin-top: 24px;
       //   padding: 12px 8px;
       &.NNPE-tableList-hasBg {
         background: #f7f7f7;
@@ -919,12 +926,14 @@ export default {
   }
   .NNPE-Book-content-inner {
     > div {
-      > h2 {
-        color: #24b99e;
-        b {
-          background: #24b99e;
+        .title-box{
+            b {
+                background: #24b99e;
+            }
+            h2 {
+                color: #24b99e;
+            }
         }
-      }
     }
   }
 }
@@ -955,12 +964,14 @@ export default {
   }
   .NNPE-Book-content-inner {
     > div {
-      > h2 {
-        color: #bd8865;
-        b {
-          background: #bd8865;
+      .title-box{
+            b {
+                background: #bd8865;
+            }
+            h2 {
+                color: #bd8865;
+            }
         }
-      }
     }
   }
 }

+ 2 - 3
src/components/Adult/preview/WordPhrase.vue

@@ -78,14 +78,13 @@
                 v-else
                 style="width: 16px; height: 16px; margin-left: 8px"
               ></div>
-
-              <span class="NPC-word-tab-common NPC-word-tab-pinyin" v-if="item.pyPosition=='first'">
+              <span class="NPC-word-tab-common NPC-word-tab-pinyin" v-if="!sItem.pinyin_site||sItem.pinyin_site=='first'">
                 {{ sItem.pinyin }}
               </span>
               <span class="NPC-word-tab-common NPC-word-tab-word">
                 {{ sItem.new_word }}
               </span>
-              <span class="NPC-word-tab-common NPC-word-tab-pinyin" v-if="item.pyPosition=='last'">
+              <span class="NPC-word-tab-common NPC-word-tab-pinyin" v-if="sItem.pinyin_site=='last'">
                 {{ sItem.pinyin }}
               </span>
               <span