|
@@ -64,12 +64,18 @@
|
|
|
class="NNPE-words"
|
|
|
v-for="(pItem, pIndex) in item"
|
|
|
:key="'wordsList' + pIndex"
|
|
|
- :class="[pItem.wordIndex == 0 ? 'textLeft' : 'textCenter']"
|
|
|
+ :class="[
|
|
|
+ pItem.chs != '“' && pItem.wordIndex == 0
|
|
|
+ ? 'textLeft'
|
|
|
+ : 'textCenter',
|
|
|
+ pItem.chs == '“' ? 'textRight' : '',
|
|
|
+ ]"
|
|
|
>
|
|
|
<template v-if="!pItem.width">
|
|
|
<template v-if="pItem.isShow">
|
|
|
<template
|
|
|
v-if="
|
|
|
+ item[pIndex + 1] &&
|
|
|
item[pIndex + 1].chs &&
|
|
|
chsFhList.indexOf(item[pIndex + 1].chs) > -1
|
|
|
"
|
|
@@ -168,6 +174,58 @@
|
|
|
>
|
|
|
</template>
|
|
|
</span>
|
|
|
+ <span
|
|
|
+ class="NNPE-words-box"
|
|
|
+ v-if="
|
|
|
+ item[pIndex + 2] &&
|
|
|
+ item[pIndex + 2].chs &&
|
|
|
+ chsFhList.indexOf(item[pIndex + 2].chs) > -1
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <template v-if="curQue.pyPosition == 'top'">
|
|
|
+ <span
|
|
|
+ v-if="config.isShowPY"
|
|
|
+ :class="[
|
|
|
+ 'NNPE-pinyin',
|
|
|
+ sentIndex == index ? 'wordBlank' : '',
|
|
|
+ noFont.indexOf(item[pIndex + 2].pinyin) > -1
|
|
|
+ ? 'noFont'
|
|
|
+ : '',
|
|
|
+ ]"
|
|
|
+ style="text-align: left"
|
|
|
+ >{{ item[pIndex + 2].pinyin }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ <span class="NNPE-chs" style="text-align: left">
|
|
|
+ <span
|
|
|
+ :class="[
|
|
|
+ pItem.timeList[pItem.leg - 1] &&
|
|
|
+ curQue.wordTime &&
|
|
|
+ curTime >= pItem.timeList[pItem.leg - 1].wordBg &&
|
|
|
+ curTime <= curQue.wordTime[index].ed
|
|
|
+ ? 'active'
|
|
|
+ : '',
|
|
|
+ sentIndex == index ? 'wordBlank' : '',
|
|
|
+ ]"
|
|
|
+ >
|
|
|
+ {{ item[pIndex + 2].chs }}</span
|
|
|
+ >
|
|
|
+ </span>
|
|
|
+ <template v-if="curQue.pyPosition == 'bottom'">
|
|
|
+ <span
|
|
|
+ v-if="config.isShowPY"
|
|
|
+ :class="[
|
|
|
+ 'NNPE-pinyin',
|
|
|
+ sentIndex == index ? 'wordBlank' : '',
|
|
|
+ noFont.indexOf(item[pIndex + 2].pinyin) > -1
|
|
|
+ ? 'noFont'
|
|
|
+ : '',
|
|
|
+ ]"
|
|
|
+ style="text-align: left"
|
|
|
+ >{{ item[pIndex + 2].pinyin }}</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </span>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<template v-if="curQue.pyPosition == 'top'">
|
|
@@ -175,7 +233,7 @@
|
|
|
v-if="config.isShowPY"
|
|
|
class="NNPE-pinyin"
|
|
|
:class="[
|
|
|
- pItem.padding ? 'padding' : '',
|
|
|
+ pItem.chs != '“' && pItem.padding ? 'padding' : '',
|
|
|
pItem.className ? pItem.className : '',
|
|
|
sentIndex == index ? 'wordBlank' : '',
|
|
|
noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
|
|
@@ -186,7 +244,9 @@
|
|
|
<span
|
|
|
class="NNPE-chs"
|
|
|
:class="[
|
|
|
- pItem.padding && config.isShowPY ? 'padding' : '',
|
|
|
+ pItem.chs != '“' && pItem.padding && config.isShowPY
|
|
|
+ ? 'padding'
|
|
|
+ : '',
|
|
|
sentIndex == index ? 'wordBlank' : '',
|
|
|
]"
|
|
|
>
|
|
@@ -213,7 +273,7 @@
|
|
|
v-if="config.isShowPY"
|
|
|
class="NNPE-pinyin"
|
|
|
:class="[
|
|
|
- pItem.padding ? 'padding' : '',
|
|
|
+ pItem.chs != '“' && pItem.padding ? 'padding' : '',
|
|
|
pItem.className ? pItem.className : '',
|
|
|
sentIndex == index ? 'wordBlank' : '',
|
|
|
noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
|
|
@@ -335,7 +395,7 @@ export default {
|
|
|
return {
|
|
|
resObj: null,
|
|
|
curTime: 0, //单位s
|
|
|
- chsFhList: [",", "。", "“", ":", "》", "《", "?", "!", ";"],
|
|
|
+ chsFhList: [",", "。", "”", ":", "》", "《", "?", "!", ";"],
|
|
|
enFhList: [",", ".", ";", "?", "!", ":", ">", "<"],
|
|
|
stopAudio: false,
|
|
|
sentIndex: 0,
|
|
@@ -496,7 +556,7 @@ export default {
|
|
|
? wItem.chs.length
|
|
|
: sentArr[wIndex - 1].endIndex + wItem.chs.length;
|
|
|
// this.judgePad(sItem, wItem, wIndex);
|
|
|
- this.mergeWordSymbol(sItem, wItem, wIndex);
|
|
|
+ this.mergeWordSymbol(wItem);
|
|
|
let obj = {
|
|
|
paraIndex: dIndex, //段落索引
|
|
|
sentIndex: sIndex, //在段落中句子索引
|
|
@@ -543,16 +603,11 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
//词和标点合一起
|
|
|
- mergeWordSymbol(sItem, wItem, curIndex) {
|
|
|
- let leg = sItem.length;
|
|
|
- if (curIndex < leg - 1) {
|
|
|
- let nextIndex = curIndex + 1;
|
|
|
-
|
|
|
- if (this.chsFhList.indexOf(wItem.chs) > -1) {
|
|
|
- wItem.isShow = false;
|
|
|
- } else {
|
|
|
- wItem.isShow = true;
|
|
|
- }
|
|
|
+ mergeWordSymbol(wItem) {
|
|
|
+ if (this.chsFhList.indexOf(wItem.chs) > -1) {
|
|
|
+ wItem.isShow = false;
|
|
|
+ } else {
|
|
|
+ wItem.isShow = true;
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -756,6 +811,9 @@ export default {
|
|
|
&.textCenter {
|
|
|
text-align: center;
|
|
|
}
|
|
|
+ &.textRight {
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
> span {
|
|
|
display: block;
|
|
|
&.NNPE-pinyin {
|