Browse Source

例句样式

natasha 2 years ago
parent
commit
0544e22cdf
1 changed files with 49 additions and 10 deletions
  1. 49 10
      src/views/corpus/Result.vue

+ 49 - 10
src/views/corpus/Result.vue

@@ -175,18 +175,14 @@
                   <div class="top">
                     <div
                       class="number"
-                      :style="{
-                        marginBottom: sizeIndex == 2 ? '0' : '5px',
-                      }"
+                      :class="['number-'+sizeIndex+'-'+pinyinShow]"
                     >
                       {{ item.number }}.
                     </div>
                     <img
-                      :style="{
-                        marginBottom: sizeIndex == 2 ? '0' : '5px',
-                      }"
                       src="../../assets/teacherdev/speaker-one.png"
                       alt=""
+                      :class="['speaker-'+sizeIndex+'-'+pinyinShow]"
                     />
                     <div class="words">
                       <div
@@ -206,15 +202,14 @@
                           class="con"
                           :style="{
                             fontSize: conSize + 'px',
+                            lineHeight: conSize+8+'px'
                           }"
                           v-html="items.con"
                         ></div>
                         </div>
                             <div
                             class="shiyi"
-                            :style="{
-                                marginBottom: sizeIndex == 2 ? '0' : '5px',
-                            }"
+                            :class="['shiyi-'+sizeIndex]"
                             v-if="shiyiShow"
                             >
                         ({{ item.shiyi }})
@@ -1213,25 +1208,61 @@ export default {
             margin-bottom: 8px;
             .top {
               display: flex;
-              align-items: flex-end;
+              align-items: flex-start;
               flex-flow: wrap;
+              width: 100%;
               .number {
                 width: 22px;
                 font-weight: 400;
                 font-size: 14px;
+                line-height: 21px;
                 text-align: right;
                 color: rgba(0, 0, 0, 0.3);
                 margin-right: 8px;
+                margin-top: 19px;
+                &-1-false{
+                    margin-top: 3px;
+                }
+                &-0-true{
+                    margin-top: 21px;
+                }
+                &-0-false{
+                    margin-top: 5px;
+                }
+                &-2-true{
+                    margin-top: 17px;
+                }
+                &-2-false{
+                    margin-top: 1px;
+                }
               }
               img {
                 width: 16px;
                 height: 16px;
                 cursor: pointer;
                 margin-right: 8px;
+                margin-top: 22px;
+                &.speaker-1-false{
+                    margin-top: 6px;
+                }
+                &.speaker-0-true{
+                    margin-top: 24px;
+                }
+                &.speaker-0-false{
+                    margin-top: 8px;
+                }
+                &.speaker-2-true{
+                    margin-top: 20px;
+                }
+                &.speaker-2-false{
+                    margin-top: 4px;
+                }
               }
               .words {
                 display: flex;
                 align-items: flex-end;
+                flex: 1;
+                flex-flow: wrap;
                 > div {
                   .pinyin {
                     font-family: "GB-PINYINOK-B";
@@ -1239,6 +1270,7 @@ export default {
                     font-size: 12px;
                     color: rgba(0, 0, 0, 0.5);
                     text-align: center;
+                    margin-bottom: 2px;
                   }
                   .con {
                     font-family: "FZJCGFKTK";
@@ -1253,6 +1285,13 @@ export default {
                 font-weight: 400;
                 font-size: 12px;
                 color: #48a3e6;
+                line-height: 24px;
+                &-0{
+                    line-height: 32px;
+                }
+                &-1{
+                    line-height: 28px;
+                }
               }
             }
             .bottom {