|
|
@@ -19,7 +19,7 @@
|
|
|
color: colorObj.titleColor,
|
|
|
fontSize: titleFontsize + 'px',
|
|
|
lineHeight: titleFontsize + 8 + 'px',
|
|
|
- marginRight: '10px',
|
|
|
+ marginRight: itemR.tokens[9] === '' ? '' : '10px',
|
|
|
fontWeight: '700',
|
|
|
}"
|
|
|
:class="[
|
|
|
@@ -27,18 +27,18 @@
|
|
|
itemR.marginRight ? 'marginSingleRight' : '',
|
|
|
]"
|
|
|
>
|
|
|
- <template v-if="itemR.isShow">
|
|
|
- <span
|
|
|
- class="NNPE-chs"
|
|
|
- :class="[
|
|
|
- itemR.type,
|
|
|
- itemR.tokens[9] === '' ? 'marginRight' : '',
|
|
|
- itemR.highIndex ? 'fontWeight' : '',
|
|
|
- itemR.marginRight ? 'marginSingleRight' : '',
|
|
|
- ]"
|
|
|
- >{{ itemR.tokens[2] }}</span
|
|
|
- >
|
|
|
- <span
|
|
|
+ <!-- <template v-if="itemR.isShow"> -->
|
|
|
+ <span
|
|
|
+ class="NNPE-chs"
|
|
|
+ :class="[
|
|
|
+ itemR.type,
|
|
|
+ itemR.tokens[9] === '' ? 'marginRight' : '',
|
|
|
+ itemR.highIndex ? 'fontWeight' : '',
|
|
|
+ itemR.marginRight ? 'marginSingleRight' : '',
|
|
|
+ ]"
|
|
|
+ >{{ itemR.tokens[2] }}</span
|
|
|
+ >
|
|
|
+ <!-- <span
|
|
|
class="NNPE-chs NNPE-chs-both"
|
|
|
v-if="
|
|
|
resArr.wordsList[0][indexR + 1] &&
|
|
|
@@ -57,7 +57,7 @@
|
|
|
]"
|
|
|
>{{ resArr.wordsList[0][indexR + 1].tokens[2] }}</span
|
|
|
>
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
<!-- {{itemR.tokens[2]}} -->
|
|
|
</span>
|
|
|
</h2>
|
|
|
@@ -173,124 +173,76 @@
|
|
|
<div class="wordsList-box">
|
|
|
<div class="nnpe-sentence-box">
|
|
|
<div v-for="(pItem, pIndex) in item" :key="'wordsList' + pIndex">
|
|
|
- <template v-if="pItem.isShow">
|
|
|
- <div
|
|
|
+ <!-- <template v-if="pItem.isShow"> -->
|
|
|
+ <div
|
|
|
+ :class="[
|
|
|
+ 'NNPE-words',
|
|
|
+ isPlaying &&
|
|
|
+ resArr.timeList[index] &&
|
|
|
+ resArr.timeList[index] &&
|
|
|
+ curTime >= resArr.timeList[index].s &&
|
|
|
+ curTime <= resArr.timeList[index].e
|
|
|
+ ? 'sentActive'
|
|
|
+ : '',
|
|
|
+ pItem.pno == paraIndex && pItem.sno == sentIndex
|
|
|
+ ? 'overActive'
|
|
|
+ : '',
|
|
|
+ ]"
|
|
|
+ @click="
|
|
|
+ handleChangeTime(
|
|
|
+ resArr.timeList[index] &&
|
|
|
+ resArr.timeList[index] &&
|
|
|
+ resArr.timeList[index].s
|
|
|
+ )
|
|
|
+ "
|
|
|
+ @mouseover="handleMouseover(pItem)"
|
|
|
+ @mouseleave="handleMouseleave"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ class="NNPE-chs"
|
|
|
:class="[
|
|
|
- 'NNPE-words',
|
|
|
isPlaying &&
|
|
|
resArr.timeList[index] &&
|
|
|
resArr.timeList[index] &&
|
|
|
- curTime >= resArr.timeList[index].s &&
|
|
|
+ resArr.timeList[index].e &&
|
|
|
+ resArr.timeList[index].tokens &&
|
|
|
+ resArr.timeList[index].tokens[pItem.wIndex] &&
|
|
|
+ curTime >=
|
|
|
+ resArr.timeList[index].tokens[pItem.wIndex].s &&
|
|
|
curTime <= resArr.timeList[index].e
|
|
|
- ? 'sentActive'
|
|
|
- : '',
|
|
|
- pItem.pno == paraIndex && pItem.sno == sentIndex
|
|
|
- ? 'overActive'
|
|
|
+ ? 'wordActive'
|
|
|
: '',
|
|
|
+ pItem.noBefore ? 'marginLeft' : '',
|
|
|
+ pItem.noAfter ? 'marginRight' : '',
|
|
|
]"
|
|
|
- @click="
|
|
|
- handleChangeTime(
|
|
|
- resArr.timeList[index] &&
|
|
|
- resArr.timeList[index] &&
|
|
|
- resArr.timeList[index].s
|
|
|
- )
|
|
|
- "
|
|
|
- @mouseover="handleMouseover(pItem)"
|
|
|
- @mouseleave="handleMouseleave"
|
|
|
- >
|
|
|
- <span
|
|
|
- class="NNPE-chs"
|
|
|
- :class="[
|
|
|
- isPlaying &&
|
|
|
- resArr.timeList[index] &&
|
|
|
- resArr.timeList[index] &&
|
|
|
- resArr.timeList[index].e &&
|
|
|
- resArr.timeList[index].tokens &&
|
|
|
- resArr.timeList[index].tokens[pItem.wIndex] &&
|
|
|
- curTime >=
|
|
|
- resArr.timeList[index].tokens[pItem.wIndex].s &&
|
|
|
- curTime <= resArr.timeList[index].e
|
|
|
- ? 'wordActive'
|
|
|
- : '',
|
|
|
- pItem.tokens[9] === '' ? 'marginRight' : '',
|
|
|
- pItem.marginRight ? 'marginSingleRight' : '',
|
|
|
- ]"
|
|
|
- :style="{
|
|
|
- fontSize: wordFontsize + 'px',
|
|
|
- color:
|
|
|
- isPlaying &&
|
|
|
- resArr.timeList[index] &&
|
|
|
- resArr.timeList[index] &&
|
|
|
- resArr.timeList[index].tokens[pItem.wIndex] &&
|
|
|
- curTime >=
|
|
|
- resArr.timeList[index].tokens[pItem.wIndex].s &&
|
|
|
- curTime <=
|
|
|
- resArr.timeList[index].tokens[pItem.wIndex].e
|
|
|
- ? colorObj.statisticValue
|
|
|
- : resArr.timeList[index] &&
|
|
|
- resArr.timeList[index] &&
|
|
|
- curTime >= resArr.timeList[index].s &&
|
|
|
- curTime <= resArr.timeList[index].e
|
|
|
- ? colorObj.contentColor
|
|
|
- : colorObj.type === 'white'
|
|
|
- ? '#D0D3D9'
|
|
|
- : colorObj.type === 'darkGreen'
|
|
|
- ? '#7A8983'
|
|
|
- : colorObj.type === 'darkBlue'
|
|
|
- ? '#737781'
|
|
|
- : '#6B7C74',
|
|
|
- }"
|
|
|
- >{{ pItem.tokens[2] }}</span
|
|
|
- >
|
|
|
- <span
|
|
|
- class="NNPE-chs NNPE-chs-both"
|
|
|
- v-if="
|
|
|
- item[pIndex + 1] &&
|
|
|
- item[pIndex + 1].tokens[2] &&
|
|
|
- enFhList.indexOf(item[pIndex + 1].tokens[2]) > -1
|
|
|
- "
|
|
|
- :class="[
|
|
|
+ :style="{
|
|
|
+ fontSize: wordFontsize + 'px',
|
|
|
+ color:
|
|
|
isPlaying &&
|
|
|
resArr.timeList[index] &&
|
|
|
resArr.timeList[index] &&
|
|
|
resArr.timeList[index].tokens[pItem.wIndex] &&
|
|
|
curTime >=
|
|
|
resArr.timeList[index].tokens[pItem.wIndex].s &&
|
|
|
- curTime <= resArr.timeList[index].e
|
|
|
- ? 'wordActive'
|
|
|
- : '',
|
|
|
- item[pIndex + 1].tokens[8] === '' ? 'marginLeft' : '',
|
|
|
- item[pIndex + 1].marginRight ? 'marginSingleRight' : '',
|
|
|
- ]"
|
|
|
- :style="{
|
|
|
- fontSize: wordFontsize + 'px',
|
|
|
- color:
|
|
|
- isPlaying &&
|
|
|
- resArr.timeList[index] &&
|
|
|
- resArr.timeList[index] &&
|
|
|
- resArr.timeList[index].tokens[pItem.wIndex] &&
|
|
|
- curTime >=
|
|
|
- resArr.timeList[index].tokens[pItem.wIndex].s &&
|
|
|
- curTime <=
|
|
|
- resArr.timeList[index].tokens[pItem.wIndex].e
|
|
|
- ? colorObj.statisticValue
|
|
|
- : resArr.timeList[index] &&
|
|
|
- resArr.timeList[index] &&
|
|
|
- curTime >= resArr.timeList[index].s &&
|
|
|
- curTime <= resArr.timeList[index].e
|
|
|
- ? colorObj.contentColor
|
|
|
- : colorObj.type === 'white'
|
|
|
- ? '#D0D3D9'
|
|
|
- : colorObj.type === 'darkGreen'
|
|
|
- ? '#7A8983'
|
|
|
- : colorObj.type === 'darkBlue'
|
|
|
- ? '#737781'
|
|
|
- : '#6B7C74',
|
|
|
- }"
|
|
|
- >{{ item[pIndex + 1].tokens[2] }}</span
|
|
|
- >
|
|
|
- </div>
|
|
|
- </template>
|
|
|
+ curTime <= resArr.timeList[index].tokens[pItem.wIndex].e
|
|
|
+ ? colorObj.statisticValue
|
|
|
+ : resArr.timeList[index] &&
|
|
|
+ resArr.timeList[index] &&
|
|
|
+ curTime >= resArr.timeList[index].s &&
|
|
|
+ curTime <= resArr.timeList[index].e
|
|
|
+ ? colorObj.contentColor
|
|
|
+ : colorObj.type === 'white'
|
|
|
+ ? '#D0D3D9'
|
|
|
+ : colorObj.type === 'darkGreen'
|
|
|
+ ? '#7A8983'
|
|
|
+ : colorObj.type === 'darkBlue'
|
|
|
+ ? '#737781'
|
|
|
+ : '#6B7C74',
|
|
|
+ }"
|
|
|
+ >{{ pItem.tokens[2] }}</span
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <!-- </template> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -588,6 +540,7 @@ export default {
|
|
|
"‘ll",
|
|
|
"”",
|
|
|
],
|
|
|
+ firstEnFhlist: ["'", "‘", "“", '"', "("],
|
|
|
paraIndex: -1, //段落索引
|
|
|
sentIndex: -1, // 句子索引
|
|
|
repeatAfter: false,
|
|
|
@@ -771,6 +724,8 @@ export default {
|
|
|
wIndex: indexs,
|
|
|
isShow: this.enFhList.indexOf(items[2]) == -1,
|
|
|
marginRight: indexs === item.tokens.length - 1,
|
|
|
+ noBefore: indexs !== 0 && !items[8],
|
|
|
+ noAfter: !items[9],
|
|
|
};
|
|
|
wordlist.push(obj);
|
|
|
});
|