|
@@ -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]===' '?'marginRight':'',itemR.marginRight?'marginSingleRight':''
|
|
|
+ itemR.tokens[9]===''?'marginRight':'',itemR.marginRight?'marginSingleRight':''
|
|
|
]">
|
|
|
<template v-if="itemR.isShow">
|
|
|
<span
|
|
|
class="NNPE-chs"
|
|
|
:class="[
|
|
|
- itemR.type,itemR.tokens[9]===' '?'marginRight':'',itemR.marginRight?'marginSingleRight':'',itemR.highIndex?'fontWeight':'',itemR.color?'wordSelected':''
|
|
|
+ itemR.type,itemR.tokens[9]===''?'marginRight':'',itemR.marginRight?'marginSingleRight':'',itemR.highIndex?'fontWeight':'',itemR.color?'wordSelected':''
|
|
|
]"
|
|
|
:style="{background: itemR.color?itemR.color:'',borderColor:itemR.borderColor?itemR.borderColor:''}"
|
|
|
>{{ itemR.tokens[2] }}</span
|
|
@@ -22,7 +22,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]===' '?'marginRight':'',resArr[0].wordsList[indexR + 1].marginRight?'marginSingleRight':'',resArr[0].wordsList[indexR + 1].highIndex?'fontWeight':'',resArr[0].wordsList[indexR + 1].color?'wordSelected':''
|
|
|
+ resArr[0].wordsList[indexR + 1].type,resArr[0].wordsList[indexR + 1].tokens[8]===''?'marginLeft':'',resArr[0].wordsList[indexR + 1].marginRight?'marginSingleRight':'',resArr[0].wordsList[indexR + 1].highIndex?'fontWeight':'',resArr[0].wordsList[indexR + 1].color?'wordSelected':''
|
|
|
]"
|
|
|
:style="{background: resArr[0].wordsList[indexR + 1].color?resArr[0].wordsList[indexR + 1].color:'',borderColor:resArr[0].wordsList[indexR + 1].borderColor?resArr[0].wordsList[indexR + 1].borderColor:''}"
|
|
|
>{{ resArr[0].wordsList[indexR + 1].tokens[2] }}</span
|
|
@@ -72,7 +72,7 @@
|
|
|
<span
|
|
|
class="NNPE-chs"
|
|
|
:class="[
|
|
|
- pItem.tokens[9]===' '?'marginRight':'',pItem.marginRight?'marginSingleRight':'',pItem.color?'wordSelected':''
|
|
|
+ pItem.tokens[9]===''?'marginRight':'',pItem.marginRight?'marginSingleRight':'',pItem.color?'wordSelected':''
|
|
|
]"
|
|
|
:style="{fontSize:wordFontsize + 'px',color: colorObj.contentColor,background:pItem.color?pItem.color:'',borderColor:pItem.borderColor?pItem.borderColor:''}"
|
|
|
>{{ pItem.tokens[2] }}</span
|
|
@@ -83,7 +83,7 @@
|
|
|
item.wordsList[pIndex + 1].tokens[2] &&
|
|
|
enFhList.indexOf(item.wordsList[pIndex + 1].tokens[2]) > -1"
|
|
|
:class="[
|
|
|
- item.wordsList[pIndex + 1].tokens[9]===' '?'marginRight':'',item.wordsList[pIndex + 1].marginRight?'marginSingleRight':'',item.wordsList[pIndex + 1].color?'wordSelected':''
|
|
|
+ item.wordsList[pIndex + 1].tokens[8]===''?'marginLeft':'',item.wordsList[pIndex + 1].marginRight?'marginSingleRight':'',item.wordsList[pIndex + 1].color?'wordSelected':''
|
|
|
]"
|
|
|
:style="{fontSize:wordFontsize + 'px',color:colorObj.contentColor,background:item.wordsList[pIndex + 1].color?item.wordsList[pIndex + 1].color:'',borderColor:item.wordsList[pIndex + 1].borderColor?item.wordsList[pIndex + 1].borderColor:''}"
|
|
|
>{{ item.wordsList[pIndex + 1].tokens[2] }}</span
|
|
@@ -357,14 +357,16 @@ export default {
|
|
|
item.wordsList.forEach((items,indexs) => {
|
|
|
// 字符串拼接相等即为匹配相同
|
|
|
let searchArr = searchItem.trim().replace(/\s+/g, " ").split(' ')
|
|
|
- if (items.tokens[4].toLowerCase() == searchArr[0]) {
|
|
|
+ if (items.tokens[4].toLowerCase() == searchArr[0]||items.tokens[2].toLowerCase() == searchArr[0]) {
|
|
|
let searchStr = ''
|
|
|
let mateStr = ''
|
|
|
+ let matesStr = ''
|
|
|
searchArr.forEach((itemi,indexi)=>{
|
|
|
searchStr+=itemi.trim()+' '
|
|
|
mateStr+=item.wordsList[indexs+indexi].tokens[4].toLowerCase().trim()+' '
|
|
|
+ matesStr+=item.wordsList[indexs+indexi].tokens[2].toLowerCase().trim()+' '
|
|
|
})
|
|
|
- if(searchStr===mateStr){
|
|
|
+ if(searchStr===mateStr||searchStr===matesStr){
|
|
|
SearchwordNumber ++
|
|
|
searchArr.forEach((itemi,indexi)=>{
|
|
|
item.wordsList[indexs+indexi].color = this.currentcolorValue[i];
|
|
@@ -453,7 +455,7 @@ export default {
|
|
|
this.currentBorderColorValue.splice(index,1)
|
|
|
this.resArr.forEach((item) => {
|
|
|
item.wordsList.forEach((items) => {
|
|
|
- if (items.tokens[4].toLowerCase() == text) {
|
|
|
+ if (items.tokens[4].toLowerCase() == text||items.tokens[2].toLowerCase() == text) {
|
|
|
items.color = '';
|
|
|
items.borderColor = ''
|
|
|
}
|
|
@@ -556,11 +558,15 @@ export default {
|
|
|
font-family: 'Smartisan';
|
|
|
line-height: 150%;
|
|
|
color: #000000;
|
|
|
+ padding: 0 3px;
|
|
|
&.wordActive {
|
|
|
color: #175DFF !important;
|
|
|
}
|
|
|
&.marginRight{
|
|
|
- padding: 0 6px 0 0;
|
|
|
+ padding-right: 0;
|
|
|
+ }
|
|
|
+ &.marginLeft{
|
|
|
+ padding-left: 0;
|
|
|
}
|
|
|
&.marginSingleRight{
|
|
|
padding: 0 3px 0 0;
|