Przeglądaj źródła

左右间距调整

natasha 1 rok temu
rodzic
commit
6c44fc21bf

+ 12 - 7
src/views/bookShelf/components/InnerTextSearch.vue

@@ -5,13 +5,13 @@
         <h2 :class="['NNPE-words',]">
             <span v-for="(itemR,indexR) in resArr[0].wordsList" :key="indexR" :style="{color:colorObj.titleColor,fontSize:(wordFontsize+30)+'px',lineHeight:(wordFontsize+38)+'px',marginRight:'10px',fontWeight:'700',cursor:'pointer'}" 
             :class="[
-                    itemR.tokens[9]===' '||itemR.marginRight?'marginRight':''
+                    itemR.tokens[9]===' '?'marginRight':'',itemR.marginRight?'marginSingleRight':''
                 ]">
                 <template v-if="itemR.isShow">
                     <span
                         class="NNPE-chs"
                         :class="[
-                            itemR.type,itemR.tokens[9]===' '||itemR.marginRight?'marginRight':'',itemR.highIndex?'fontWeight':''
+                            itemR.type,itemR.tokens[9]===' '?'marginRight':'',itemR.marginRight?'marginSingleRight':'',itemR.highIndex?'fontWeight':''
                         ]"
                         >{{ itemR.tokens[2] }}</span
                     >
@@ -21,7 +21,7 @@
                         resArr[0].wordsList[indexR + 1].tokens[2] &&
                         enFhList.indexOf(resArr[0].wordsList[indexR + 1].tokens[2]) > -1"
                         :class="[
-                                resArr[0].wordsList[indexR + 1].type,resArr[0].wordsList[indexR + 1].tokens[9]===' '||resArr[0].wordsList[indexR + 1].marginRight?'marginRight':'',resArr[0].wordsList[indexR + 1].highIndex?'fontWeight':''
+                                resArr[0].wordsList[indexR + 1].type,resArr[0].wordsList[indexR + 1].tokens[9]===' '?'marginRight':'',resArr[0].wordsList[indexR + 1].marginRight?'marginSingleRight':'',resArr[0].wordsList[indexR + 1].highIndex?'fontWeight':''
                             ]"
                         >{{ resArr[0].wordsList[indexR + 1].tokens[2] }}</span
                     >
@@ -70,7 +70,7 @@
                             <span
                                 class="NNPE-chs"
                                 :class="[
-                                    pItem.tokens[9]===' '||pItem.marginRight?'marginRight':''
+                                    pItem.tokens[9]===' '?'marginRight':'',pItem.marginRight?'marginSingleRight':''
                                 ]"
                                 :style="{fontSize:wordFontsize + 'px',color: colorObj.contentColor}"
                                 >{{ pItem.tokens[2] }}</span
@@ -81,7 +81,7 @@
                             item.wordsList[pIndex + 1].tokens[2] &&
                             enFhList.indexOf(item.wordsList[pIndex + 1].tokens[2]) > -1"
                             :class="[
-                                    item.wordsList[pIndex + 1].tokens[9]===' '||item.wordsList[pIndex + 1].marginRight?'marginRight':''
+                                    item.wordsList[pIndex + 1].tokens[9]===' '?'marginRight':'',item.wordsList[pIndex + 1].marginRight?'marginSingleRight':''
                                 ]"
                                 :style="{fontSize:wordFontsize + 'px',color: colorObj.contentColor}"
                             >{{ item.wordsList[pIndex + 1].tokens[2] }}</span
@@ -187,7 +187,9 @@ export default {
                 tokens: items,
                 wIndex: indexs,
                 isShow: this.enFhList.indexOf(items[2])==-1,
-                marginRight: indexs===item.tokens.length-1
+                marginRight: indexs===item.tokens.length-1,
+                color: '',
+                bg: ''
             }
             resArr[item.pno].wordsList.push(obj)
         })
@@ -290,7 +292,10 @@ export default {
             color: #175DFF !important;
           }
           &.marginRight{
-            padding: 0 6px 0 0;
+            padding: 0 3px;
+          }
+          &.marginSingleRight{
+            padding: 0 3px 0 0;
           }
         }
         &.padding {

+ 9 - 6
src/views/bookShelf/components/NormalModel.vue

@@ -34,13 +34,13 @@
                     curTime <= resArr[0].timeList[0].e
                         ? 'wordActive'
                         : '',
-                    itemR.tokens[9]===' '||itemR.marginRight?'marginRight':''
+                    itemR.tokens[9]===' '?'marginRight':'',itemR.marginRight?'marginSingleRight':''
                 ]">
                     <template v-if="itemR.isShow">
                         <span
                                 class="NNPE-chs"
                                 :class="[
-                                    itemR.type,itemR.tokens[9]===' '||itemR.marginRight?'marginRight':'',itemR.highIndex?'fontWeight':''
+                                    itemR.type,itemR.tokens[9]===' '?'marginRight':'',itemR.highIndex?'fontWeight':'',itemR.marginRight?'marginSingleRight':''
                                 ]"
                                 >{{ itemR.tokens[2] }}</span
                             >
@@ -50,7 +50,7 @@
                                 resArr[0].wordsList[indexR + 1].tokens[2] &&
                                 enFhList.indexOf(resArr[0].wordsList[indexR + 1].tokens[2]) > -1"
                                 :class="[
-                                        resArr[0].wordsList[indexR + 1].type,resArr[0].wordsList[indexR + 1].tokens[9]===' '||resArr[0].wordsList[indexR + 1].marginRight?'marginRight':'',resArr[0].wordsList[indexR + 1].highIndex?'fontWeight':''
+                                        resArr[0].wordsList[indexR + 1].type,resArr[0].wordsList[indexR + 1].tokens[9]===' '?'marginRight':'',resArr[0].wordsList[indexR + 1].highIndex?'fontWeight':'',resArr[0].wordsList[indexR + 1].marginRight?'marginSingleRight':''
                                     ]"
                                 >{{ resArr[0].wordsList[indexR + 1].tokens[2] }}</span
                             >
@@ -129,7 +129,7 @@
                                         curTime <= item.timeList[pItem.sno].e
                                             ? 'wordActive'
                                             : '',
-                                        pItem.tokens[9]===' '||pItem.marginRight?'marginRight':''
+                                        pItem.tokens[9]===' '?'marginRight':'',pItem.marginRight?'marginSingleRight':''
                                     ]"
                                     :style="{fontSize:wordFontsize + 'px',color: isPlaying &&
                                             item.timeList &&
@@ -155,7 +155,7 @@
                                         curTime <= item.timeList[pItem.sno].e
                                             ? 'wordActive'
                                             : '',
-                                        item.wordsList[pIndex + 1].tokens[9]===' '||item.wordsList[pIndex + 1].marginRight?'marginRight':''
+                                        item.wordsList[pIndex + 1].tokens[9]===' '?'marginRight':'',item.wordsList[pIndex + 1].marginRight?'marginSingleRight':''
                                     ]"
                                     :style="{fontSize:wordFontsize + 'px',color: isPlaying &&
                                             item.timeList &&
@@ -392,7 +392,10 @@ export default {
             color: #175DFF !important;
           }
           &.marginRight{
-            padding: 0 6px 0 0;
+            padding: 0 3px;
+          }
+          &.marginSingleRight{
+            padding: 0 3px 0 0;
           }
         }
         &.padding {

+ 9 - 6
src/views/bookShelf/components/PhraseModel.vue

@@ -5,7 +5,7 @@
         <h2>
             <span v-for="(itemR,indexR) in resArr[0].wordsList" :key="indexR" :style="{color:colorObj.titleColor,fontSize:(wordFontsize+30)+'px',lineHeight:(wordFontsize+38)+'px',marginRight:'10px',fontWeight:'700',cursor:'pointer'}" 
             :class="[
-                    itemR.tokens[9]===' '||itemR.marginRight?'marginRight':'',
+                    itemR.tokens[9]===' '?'marginRight':'',itemR.marginRight?'marginSingleRight':'',
                     itemR.isExplain||itemR.explainNumber?'hasExplain':''
                 ]">
                 <template v-if="itemR.isShow">
@@ -18,7 +18,7 @@
                         <span
                                 class="NNPE-chs"
                                 :class="[
-                                    itemR.type,itemR.tokens[9]===' '||itemR.marginRight?'marginRight':'',itemR.highIndex?'fontWeight':''
+                                    itemR.type,itemR.tokens[9]===' '?'marginRight':'',itemR.highIndex?'fontWeight':'',itemR.marginRight?'marginSingleRight':'',
                                 ]"
                                 @click="showItem(itemR)"
                                 >{{ itemR.tokens[2] }}</span
@@ -34,7 +34,7 @@
                                 resArr[0].wordsList[indexR + 1].tokens[2] &&
                                 enFhList.indexOf(resArr[0].wordsList[indexR + 1].tokens[2]) > -1"
                                 :class="[
-                                        resArr[0].wordsList[indexR + 1].type,resArr[0].wordsList[indexR + 1].tokens[9]===' '||resArr[0].wordsList[indexR + 1].marginRight?'marginRight':'',resArr[0].wordsList[indexR + 1].highIndex?'fontWeight':''
+                                        resArr[0].wordsList[indexR + 1].type,resArr[0].wordsList[indexR + 1].tokens[9]===' '?'marginRight':'',resArr[0].wordsList[indexR + 1].highIndex?'fontWeight':'',resArr[0].wordsList[indexR + 1].marginRight?'marginSingleRight':'',
                                     ]"
                                 @click="showItem(resArr[0].wordsList[indexR + 1])"
                                 >{{ resArr[0].wordsList[indexR + 1].tokens[2] }}</span
@@ -91,7 +91,7 @@
                                     <span
                                         class="NNPE-chs"
                                         :class="[
-                                            pItem.type,pItem.tokens[9]===' '||pItem.marginRight?'marginRight':'',pItem.highIndex?'fontWeight':''
+                                            pItem.type,pItem.tokens[9]===' '?'marginRight':'',pItem.highIndex?'fontWeight':'',pItem.marginRigh?'marginSingleRight':''
                                         ]"
                                         :style="{fontSize:wordFontsize + 'px',color: colorObj.contentColor}"
                                         @click="showItem(pItem)"
@@ -108,7 +108,7 @@
                                         item.wordsList[pIndex + 1].tokens[2] &&
                                         enFhList.indexOf(item.wordsList[pIndex + 1].tokens[2]) > -1"
                                         :class="[
-                                                item.wordsList[pIndex + 1].type,item.wordsList[pIndex + 1].tokens[9]===' '||item.wordsList[pIndex + 1].marginRight?'marginRight':'',item.wordsList[pIndex + 1].highIndex?'fontWeight':''
+                                                item.wordsList[pIndex + 1].type,item.wordsList[pIndex + 1].tokens[9]===' '?'marginRight':'',item.wordsList[pIndex + 1].highIndex?'fontWeight':'',item.wordsList[pIndex + 1].marginRight?'marginSingleRight':''
                                             ]"
                                         :style="{fontSize:wordFontsize + 'px',color: colorObj.contentColor}"
                                         @click="showItem(item.wordsList[pIndex + 1])"
@@ -551,7 +551,10 @@ export default {
             color: #175DFF !important;
           }
           &.marginRight{
-            padding: 0 6px 0 0;
+            padding: 0 3px;
+          }
+          &.marginSingleRight{
+            padding: 0 3px 0 0;
           }
           &.fontWeight{
             font-weight: bold;