|
@@ -17,7 +17,10 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="top-middle">
|
|
|
- <div :class="['audio-box', bgIndex == 1 ? 'audio-box-green' : '']">
|
|
|
+ <div
|
|
|
+ v-if="mp3"
|
|
|
+ :class="['audio-box', bgIndex == 1 ? 'audio-box-green' : '']"
|
|
|
+ >
|
|
|
<AudioLineSentence
|
|
|
:key="'sent' + curSentIndex"
|
|
|
:mp3="mp3"
|
|
@@ -88,7 +91,7 @@
|
|
|
@click="exitFullScreen"
|
|
|
>
|
|
|
<span
|
|
|
- :class="['close-icon', bgIndex == 1 ? 'close-icon-yellow' : '']"
|
|
|
+ :class="['close-icon', bgIndex == 1 ? 'close-icon-white' : '']"
|
|
|
></span>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -101,8 +104,8 @@
|
|
|
<div
|
|
|
:class="[
|
|
|
'vc-left vc-left-grey',
|
|
|
- isShow && bgIndex == 0 ? 'vc-left-black' : '',
|
|
|
- isShow && bgIndex == 1 ? 'vc-left-white' : '',
|
|
|
+ isShowPN && bgIndex == 0 ? 'vc-left-black' : '',
|
|
|
+ isShowPN && bgIndex == 1 ? 'vc-left-white' : '',
|
|
|
]"
|
|
|
@click="prevSentence"
|
|
|
></div>
|
|
@@ -110,17 +113,19 @@
|
|
|
<div class="NNPE-words-box">
|
|
|
<div
|
|
|
class="NNPE-words"
|
|
|
- v-for="(pItem, pIndex) in item.sentArr"
|
|
|
+ v-for="(pItem, pIndex) in item"
|
|
|
:key="'wordsList' + pIndex"
|
|
|
:class="[pItem.wordIndex == 0 ? 'textLeft' : 'textCenter']"
|
|
|
+ @dblclick="showWordDetail($event, pItem)"
|
|
|
+ @click="playWord(pItem)"
|
|
|
>
|
|
|
<template v-if="!pItem.width">
|
|
|
<template v-if="pItem.isShow">
|
|
|
<template
|
|
|
v-if="
|
|
|
- item.sentArr[pIndex + 1] &&
|
|
|
- item.sentArr[pIndex + 1].chs &&
|
|
|
- chsFhList.indexOf(item.sentArr[pIndex + 1].chs) > -1
|
|
|
+ item[pIndex + 1] &&
|
|
|
+ item[pIndex + 1].chs &&
|
|
|
+ chsFhList.indexOf(item[pIndex + 1].chs) > -1
|
|
|
"
|
|
|
>
|
|
|
<span class="NNPE-words-box">
|
|
@@ -130,7 +135,7 @@
|
|
|
class="NNPE-pinyin"
|
|
|
:class="[
|
|
|
pItem.className ? pItem.className : '',
|
|
|
- noFont.indexOf(item.pinyin) > -1 ? 'noFont' : '',
|
|
|
+ noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
|
|
|
bgIndex == 1 ? 'font-white' : '',
|
|
|
]"
|
|
|
>{{ pItem.pinyin }}</span
|
|
@@ -152,9 +157,17 @@
|
|
|
curQue.wordTime &&
|
|
|
curQue.wordTime[curSentIndex] &&
|
|
|
curTime <= curQue.wordTime[curSentIndex].ed
|
|
|
- ? 'active'
|
|
|
+ ? bgIndex == 0
|
|
|
+ ? 'active'
|
|
|
+ : 'active-yellow'
|
|
|
: '',
|
|
|
bgIndex == 1 ? 'font-white' : '',
|
|
|
+ bgIndex == 0 && wordIndex == pItem.wordIndex
|
|
|
+ ? 'wordActive'
|
|
|
+ : '',
|
|
|
+ bgIndex == 1 && wordIndex == pItem.wordIndex
|
|
|
+ ? 'wordActive-blue'
|
|
|
+ : '',
|
|
|
]"
|
|
|
>{{ pItem.chs[wIndex] }}</span
|
|
|
>
|
|
@@ -166,7 +179,7 @@
|
|
|
class="NNPE-pinyin"
|
|
|
:class="[
|
|
|
pItem.className ? pItem.className : '',
|
|
|
- noFont.indexOf(item.pinyin) > -1 ? 'noFont' : '',
|
|
|
+ noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
|
|
|
bgIndex == 1 ? 'font-white' : '',
|
|
|
]"
|
|
|
>{{ pItem.pinyin }}</span
|
|
@@ -179,13 +192,13 @@
|
|
|
v-if="isShowPY"
|
|
|
:class="[
|
|
|
'NNPE-pinyin',
|
|
|
- noFont.indexOf(item.sentArr[pIndex + 1].pinyin) > -1
|
|
|
+ noFont.indexOf(item[pIndex + 1].pinyin) > -1
|
|
|
? 'noFont'
|
|
|
: '',
|
|
|
bgIndex == 1 ? 'font-white' : '',
|
|
|
]"
|
|
|
style="text-align: left"
|
|
|
- >{{ item.sentArr[pIndex + 1].pinyin }}</span
|
|
|
+ >{{ item[pIndex + 1].pinyin }}</span
|
|
|
>
|
|
|
</template>
|
|
|
<span class="NNPE-chs" style="text-align: left">
|
|
@@ -197,12 +210,13 @@
|
|
|
curQue.wordTime &&
|
|
|
curQue.wordTime[curSentIndex] &&
|
|
|
curTime <= curQue.wordTime[curSentIndex].ed
|
|
|
- ? 'active'
|
|
|
+ ? bgIndex == 0
|
|
|
+ ? 'active'
|
|
|
+ : 'active-yellow'
|
|
|
: '',
|
|
|
bgIndex == 1 ? 'font-white' : '',
|
|
|
]"
|
|
|
- >
|
|
|
- {{ item.sentArr[pIndex + 1].chs }}</span
|
|
|
+ >{{ item[pIndex + 1].chs }}</span
|
|
|
>
|
|
|
</span>
|
|
|
<template v-if="curQue.pyPosition == 'bottom'">
|
|
@@ -210,13 +224,13 @@
|
|
|
v-if="isShowPY"
|
|
|
:class="[
|
|
|
'NNPE-pinyin',
|
|
|
- noFont.indexOf(item.sentArr[pIndex + 1].pinyin) > -1
|
|
|
+ noFont.indexOf(item[pIndex + 1].pinyin) > -1
|
|
|
? 'noFont'
|
|
|
: '',
|
|
|
bgIndex == 1 ? 'font-white' : '',
|
|
|
]"
|
|
|
style="text-align: left"
|
|
|
- >{{ item.sentArr[pIndex + 1].pinyin }}</span
|
|
|
+ >{{ item[pIndex + 1].pinyin }}</span
|
|
|
>
|
|
|
</template>
|
|
|
</span>
|
|
@@ -230,7 +244,7 @@
|
|
|
:class="[
|
|
|
pItem.padding ? 'padding' : '',
|
|
|
pItem.className ? pItem.className : '',
|
|
|
- noFont.indexOf(item.pinyin) > -1 ? 'noFont' : '',
|
|
|
+ noFont.indexOf(pItem.pinyin) > -1 ? 'noFont' : '',
|
|
|
bgIndex == 1 ? 'font-white' : '',
|
|
|
]"
|
|
|
>{{ pItem.pinyin }}</span
|
|
@@ -254,9 +268,17 @@
|
|
|
curQue.wordTime &&
|
|
|
curQue.wordTime[curSentIndex] &&
|
|
|
curTime <= curQue.wordTime[curSentIndex].ed
|
|
|
- ? 'active'
|
|
|
+ ? bgIndex == 0
|
|
|
+ ? 'active'
|
|
|
+ : 'active-yellow'
|
|
|
: '',
|
|
|
bgIndex == 1 ? 'font-white' : '',
|
|
|
+ bgIndex == 0 && wordIndex == pItem.wordIndex
|
|
|
+ ? 'wordActive'
|
|
|
+ : '',
|
|
|
+ bgIndex == 1 && wordIndex == pItem.wordIndex
|
|
|
+ ? 'wordActive-blue'
|
|
|
+ : '',
|
|
|
]"
|
|
|
>{{ pItem.chs[wIndex] }}</span
|
|
|
>
|
|
@@ -300,8 +322,8 @@
|
|
|
<div
|
|
|
:class="[
|
|
|
'vc-left vc-right-grey',
|
|
|
- isShow && bgIndex == 0 ? 'vc-right-black' : '',
|
|
|
- isShow && bgIndex == 1 ? 'vc-right-white' : '',
|
|
|
+ isShowPN && bgIndex == 0 ? 'vc-right-black' : '',
|
|
|
+ isShowPN && bgIndex == 1 ? 'vc-right-white' : '',
|
|
|
]"
|
|
|
@click="nextSentence"
|
|
|
></div>
|
|
@@ -325,7 +347,7 @@
|
|
|
type="full"
|
|
|
:themeColor="themeColor"
|
|
|
:index="curSentIndex"
|
|
|
- :curSentIndex="curSentIndex"
|
|
|
+ :sentIndex="curSentIndex"
|
|
|
:url="curQue.mp3_list[0].id"
|
|
|
:bg="bg"
|
|
|
:ed="ed"
|
|
@@ -346,6 +368,39 @@
|
|
|
{{ curSentIndex + 1 }}/{{ sentList.length }}
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <template v-if="isShow">
|
|
|
+ <div
|
|
|
+ ref="wordcard"
|
|
|
+ class="NNPE-wordDetail"
|
|
|
+ :style="{ top: top + 'px', left: left + 'px' }"
|
|
|
+ >
|
|
|
+ <Wordcard
|
|
|
+ :word="word"
|
|
|
+ :changeWordCard="changeWordCard"
|
|
|
+ :themeColor="themeColor"
|
|
|
+ :currentTreeID="currentTreeID"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <div class="word-play-audio" v-if="isWordPlay">
|
|
|
+ <AudioLineSentence
|
|
|
+ :mp3="mp3"
|
|
|
+ :getCurTime="getCurWordTime"
|
|
|
+ ref="audioLineWord"
|
|
|
+ :audioId="'artPraAudioId' + curSentIndex + wordIndex"
|
|
|
+ :stopAudio="stopAudio"
|
|
|
+ :width="120"
|
|
|
+ :hideSlider="false"
|
|
|
+ :bg="wordbg"
|
|
|
+ :ed="worded"
|
|
|
+ :maxTime="wordMaxTime"
|
|
|
+ :bgIndex="bgIndex"
|
|
|
+ :isRepeat="isRepeat"
|
|
|
+ :wordPlay="true"
|
|
|
+ @changePlayStatus="changePlayStatus"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -353,11 +408,13 @@
|
|
|
import AudioLineSentence from "./AudioLineSentence.vue";
|
|
|
import Soundrecorddiff from "./Soundrecorddiff.vue";
|
|
|
import AudioCompare from "./AudioCompare.vue";
|
|
|
+import Wordcard from "./components/Wordcard.vue";
|
|
|
export default {
|
|
|
components: {
|
|
|
AudioLineSentence,
|
|
|
Soundrecorddiff,
|
|
|
AudioCompare,
|
|
|
+ Wordcard,
|
|
|
},
|
|
|
props: [
|
|
|
"sentList",
|
|
@@ -367,6 +424,8 @@ export default {
|
|
|
"curQue",
|
|
|
"noFont",
|
|
|
"themeColor",
|
|
|
+ "NNPENewWordList",
|
|
|
+ "currentTreeID",
|
|
|
],
|
|
|
data() {
|
|
|
return {
|
|
@@ -408,18 +467,34 @@ export default {
|
|
|
stopAudio: false,
|
|
|
isRecord: false,
|
|
|
isShowCompare: false,
|
|
|
- isShow: false,
|
|
|
+ isShowPN: false,
|
|
|
curSentIndex: 0,
|
|
|
+ oldHz: "",
|
|
|
+ hz: "",
|
|
|
+ clientY: 0,
|
|
|
+ top: 0,
|
|
|
+ left: 0,
|
|
|
+ newWordList: [],
|
|
|
+ pinyin: "",
|
|
|
+ wordIndex: -1,
|
|
|
+ isShow: false,
|
|
|
+ wordbg: 0,
|
|
|
+ worded: 0,
|
|
|
+ wordMaxTime: 0,
|
|
|
+ isWordPlay: false,
|
|
|
+ curWordTime: 0,
|
|
|
+ isPlaying: true,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- isPlaying: function () {
|
|
|
- let playing = false;
|
|
|
- if (this.$refs.audioLineSent) {
|
|
|
- playing = this.$refs.audioLineSent.audio.isPlaying;
|
|
|
- }
|
|
|
- return playing;
|
|
|
- },
|
|
|
+ // isPlaying: function () {
|
|
|
+ // let playing = false;
|
|
|
+ // if (this.$refs.audioLineSent) {
|
|
|
+ // playing = this.$refs.audioLineSent.audio.isPlaying;
|
|
|
+ // }
|
|
|
+ // console.log(playing);
|
|
|
+ // return playing;
|
|
|
+ // },
|
|
|
},
|
|
|
watch: {
|
|
|
sentIndex: {
|
|
@@ -429,9 +504,39 @@ export default {
|
|
|
},
|
|
|
deep: true,
|
|
|
},
|
|
|
+ hz: {
|
|
|
+ handler: function (val, oldVal) {
|
|
|
+ let _this = this;
|
|
|
+ if (val) {
|
|
|
+ _this.handleNewWords(val);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 深度观察监听
|
|
|
+ deep: true,
|
|
|
+ },
|
|
|
+ isShow: {
|
|
|
+ handler: function (val, oldVal) {
|
|
|
+ let _this = this;
|
|
|
+ if (val) {
|
|
|
+ setTimeout(() => {
|
|
|
+ _this.cardHeight = _this.$refs.wordcard.offsetHeight;
|
|
|
+ if (_this.screenHeight - _this.clientY > _this.cardHeight) {
|
|
|
+ _this.top = _this.clientY + 20;
|
|
|
+ } else {
|
|
|
+ _this.top = _this.clientY - _this.cardHeight - 30;
|
|
|
+ }
|
|
|
+ }, 50);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 深度观察监听
|
|
|
+ deep: true,
|
|
|
+ },
|
|
|
},
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
+ isPlayChange(bool) {
|
|
|
+ this.isPlaying = bool;
|
|
|
+ },
|
|
|
//添加收藏
|
|
|
addColl() {
|
|
|
let Bookdetail = sessionStorage.getItem("Bookdetail");
|
|
@@ -440,7 +545,7 @@ export default {
|
|
|
}
|
|
|
let MethodName = "order-collection_manager-AddMyCollection";
|
|
|
let text = "";
|
|
|
- this.item.sentArr.forEach((item) => {
|
|
|
+ this.item.forEach((item) => {
|
|
|
if (item.chs != "#") {
|
|
|
text += item.chs;
|
|
|
}
|
|
@@ -471,7 +576,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
showPrevNext(bool) {
|
|
|
- this.isShow = bool;
|
|
|
+ this.isShowPN = bool;
|
|
|
},
|
|
|
prevSentence() {
|
|
|
if (this.curSentIndex == 0) {
|
|
@@ -515,12 +620,32 @@ export default {
|
|
|
_this.curTime = curTime * 1000;
|
|
|
}
|
|
|
},
|
|
|
+ getCurWordTime(curTime) {
|
|
|
+ let _this = this;
|
|
|
+ // if (_this.isRepeat) {
|
|
|
+ // let time = curTime * 1000;
|
|
|
+ // if (time > _this.worded || time < _this.worded) {
|
|
|
+ // _this.curWordTime = _this.worded;
|
|
|
+ // _this.$refs.audioLineWord.onTimeupdateTime(_this.wordbg / 1000);
|
|
|
+ // } else {
|
|
|
+ // _this.curWordTime = curTime * 1000;
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ _this.curWordTime = curTime * 1000;
|
|
|
+ // }
|
|
|
+ },
|
|
|
changeBg(bgIndex) {
|
|
|
this.bgIndex = bgIndex;
|
|
|
},
|
|
|
getSentence() {
|
|
|
let _this = this;
|
|
|
- _this.item = _this.sentList[_this.curSentIndex];
|
|
|
+ _this.pauseAudio();
|
|
|
+ let item = _this.sentList[_this.curSentIndex];
|
|
|
+ if (item.sentArr) {
|
|
|
+ _this.item = item.sentArr;
|
|
|
+ } else {
|
|
|
+ _this.item = item;
|
|
|
+ }
|
|
|
_this.bg = _this.curQue.wordTime[_this.curSentIndex].bg;
|
|
|
_this.ed = _this.curQue.wordTime[_this.curSentIndex].ed;
|
|
|
let maxTime = (_this.ed - _this.bg) / 1000;
|
|
@@ -529,11 +654,21 @@ export default {
|
|
|
} else {
|
|
|
_this.maxTime = maxTime;
|
|
|
}
|
|
|
- console.log(_this.sentList);
|
|
|
+ },
|
|
|
+ pauseAudio() {
|
|
|
+ let audio = document.getElementsByTagName("audio");
|
|
|
+ audio.forEach((item) => {
|
|
|
+ item.pause();
|
|
|
+ });
|
|
|
},
|
|
|
exitFullScreen() {
|
|
|
+ this.pauseAudio();
|
|
|
this.$emit("exitFullscreen");
|
|
|
},
|
|
|
+ changeFullScreen() {
|
|
|
+ this.pauseAudio();
|
|
|
+ this.$emit("changeIsFull");
|
|
|
+ },
|
|
|
handleWav(data) {},
|
|
|
// 录音时暂停音频播放
|
|
|
handleParentPlay() {
|
|
@@ -543,14 +678,172 @@ export default {
|
|
|
handleChangeStopAudio() {
|
|
|
this.stopAudio = false;
|
|
|
},
|
|
|
+ //播放音频
|
|
|
+ playWord(item) {
|
|
|
+ let _this = this;
|
|
|
+ _this.wordIndex = item.wordIndex;
|
|
|
+ let leg = item.timeList.length;
|
|
|
+ _this.wordbg = item.timeList[0].wordBg;
|
|
|
+ _this.worded = item.timeList[leg - 1].wordEd;
|
|
|
+ let wordMaxTime = (_this.worded - _this.wordbg) / 1000;
|
|
|
+ if (wordMaxTime < 1) {
|
|
|
+ _this.wordMaxTime = 1;
|
|
|
+ } else {
|
|
|
+ _this.wordMaxTime = wordMaxTime;
|
|
|
+ }
|
|
|
+ _this.isWordPlay = true;
|
|
|
+ },
|
|
|
+ changePlayStatus() {
|
|
|
+ this.isWordPlay = false;
|
|
|
+ this.wordIndex = -1;
|
|
|
+ },
|
|
|
+ showWordDetail(e, item) {
|
|
|
+ let _this = this;
|
|
|
+ if (_this.chsFhList.indexOf(item.chs) > -1) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (_this.oldHz != item.chs) {
|
|
|
+ this.isShow = false;
|
|
|
+ setTimeout(() => {
|
|
|
+ _this.hz = item.chs;
|
|
|
+ _this.pinyin = item.pinyin;
|
|
|
+ _this.wordIndex = item.wordIndex;
|
|
|
+ }, 50);
|
|
|
+ }
|
|
|
+ _this.clientY = e.clientY;
|
|
|
+
|
|
|
+ let left = e.clientX;
|
|
|
+ let width = 0;
|
|
|
+ if (item.chs.length == 1 || item.chs.length == 2) {
|
|
|
+ width = 304;
|
|
|
+ } else if (item.chs.length == 3 || item.chs.length == 4) {
|
|
|
+ width = 432;
|
|
|
+ } else if (item.chs.length > 3) {
|
|
|
+ width = 560;
|
|
|
+ }
|
|
|
+ // if (left - this.bodyLeft > this.contentWidth / 2) {
|
|
|
+ // _this.left = left - width + 10;
|
|
|
+ // } else {
|
|
|
+ _this.left = left - width / 2;
|
|
|
+ //}
|
|
|
+ },
|
|
|
+ changeWordCard(isShow) {
|
|
|
+ let _this = this;
|
|
|
+ _this.isShow = isShow;
|
|
|
+ _this.oldHz = "";
|
|
|
+ _this.hz = "";
|
|
|
+ _this.wordIndex = -1;
|
|
|
+ },
|
|
|
+ // 处理分词数据
|
|
|
+ handleNewWords(val) {
|
|
|
+ let _this = this;
|
|
|
+ _this.isShow = true;
|
|
|
+ _this.word = null;
|
|
|
+
|
|
|
+ if (_this.newWordList.indexOf(val) > -1) {
|
|
|
+ for (let i = 0; i < this.NNPENewWordList.length; i++) {
|
|
|
+ let pItem = this.NNPENewWordList[i];
|
|
|
+ for (let j = 0; j < pItem.length; j++) {
|
|
|
+ let item = pItem[j];
|
|
|
+ if (item.new_word.trim() == val.trim()) {
|
|
|
+ let wordlist = val.split("");
|
|
|
+ this.word = { list: wordlist, detail: item };
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ let wordlist = val.split("");
|
|
|
+ let option = {
|
|
|
+ definition_list: [],
|
|
|
+ mp3_list: [],
|
|
|
+ new_word: val,
|
|
|
+ pinyin: _this.pinyin,
|
|
|
+ };
|
|
|
+ _this.word = { list: wordlist, detail: option };
|
|
|
+ }
|
|
|
+ _this.oldHz = val;
|
|
|
+ },
|
|
|
+ handleNewword() {
|
|
|
+ let NewWordList = [];
|
|
|
+ this.NNPENewWordList.forEach((item) => {
|
|
|
+ item.forEach((wItem) => {
|
|
|
+ NewWordList.push(wItem.new_word);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.newWordList = JSON.parse(JSON.stringify(NewWordList));
|
|
|
+ },
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
- this.curSentIndex = this.sentIndex;
|
|
|
- console.log(this.curSentIndex);
|
|
|
- this.getSentence();
|
|
|
+ let _this = this;
|
|
|
+ if (_this.NNPENewWordList) {
|
|
|
+ _this.handleNewword();
|
|
|
+ }
|
|
|
+ _this.curSentIndex = _this.sentIndex;
|
|
|
+ _this.getSentence();
|
|
|
+ let isFullscreen =
|
|
|
+ document.fullscreenElement ||
|
|
|
+ document.mozFullScreenElement ||
|
|
|
+ document.webkitFullscreenElement ||
|
|
|
+ document.fullScreen ||
|
|
|
+ document.mozFullScreen ||
|
|
|
+ document.webkitIsFullScreen;
|
|
|
+ isFullscreen = !!isFullscreen;
|
|
|
+ document.addEventListener("fullscreenchange", () => {
|
|
|
+ let isFullscreen =
|
|
|
+ document.fullscreenElement ||
|
|
|
+ document.mozFullScreenElement ||
|
|
|
+ document.webkitFullscreenElement ||
|
|
|
+ document.fullScreen ||
|
|
|
+ document.mozFullScreen ||
|
|
|
+ document.webkitIsFullScreen;
|
|
|
+
|
|
|
+ if (!isFullscreen) {
|
|
|
+ _this.changeFullScreen();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ document.addEventListener("mozfullscreenchange", () => {
|
|
|
+ let isFullscreen =
|
|
|
+ document.fullscreenElement ||
|
|
|
+ document.mozFullScreenElement ||
|
|
|
+ document.webkitFullscreenElement ||
|
|
|
+ document.fullScreen ||
|
|
|
+ document.mozFullScreen ||
|
|
|
+ document.webkitIsFullScreen;
|
|
|
+
|
|
|
+ if (!isFullscreen) {
|
|
|
+ _this.changeFullScreen();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ document.addEventListener("webkitfullscreenchange", () => {
|
|
|
+ let isFullscreen =
|
|
|
+ document.fullscreenElement ||
|
|
|
+ document.mozFullScreenElement ||
|
|
|
+ document.webkitFullscreenElement ||
|
|
|
+ document.fullScreen ||
|
|
|
+ document.mozFullScreen ||
|
|
|
+ document.webkitIsFullScreen;
|
|
|
+
|
|
|
+ if (!isFullscreen) {
|
|
|
+ _this.changeFullScreen();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ document.addEventListener("msfullscreenchange", () => {
|
|
|
+ let isFullscreen =
|
|
|
+ document.fullscreenElement ||
|
|
|
+ document.mozFullScreenElement ||
|
|
|
+ document.webkitFullscreenElement ||
|
|
|
+ document.fullScreen ||
|
|
|
+ document.mozFullScreen ||
|
|
|
+ document.webkitIsFullScreen;
|
|
|
+
|
|
|
+ if (!isFullscreen) {
|
|
|
+ _this.changeFullScreen();
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
beforeCreate() {}, //生命周期 - 创建之前
|
|
|
beforeMount() {}, //生命周期 - 挂载之前
|
|
@@ -564,11 +857,15 @@ export default {
|
|
|
<style lang='scss' scoped>
|
|
|
//@import url(); 引入公共css类
|
|
|
.voicefull {
|
|
|
- width: 100vh;
|
|
|
+ width: 100%;
|
|
|
height: 100vh;
|
|
|
overflow: hidden;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
+ .NNPE-wordDetail {
|
|
|
+ position: fixed;
|
|
|
+ z-index: 9999;
|
|
|
+ }
|
|
|
&.bg1 {
|
|
|
background: #fff;
|
|
|
}
|
|
@@ -811,6 +1108,10 @@ export default {
|
|
|
}
|
|
|
.NNPE-words {
|
|
|
float: left;
|
|
|
+ user-select: none;
|
|
|
+ -webkit-user-select: none;
|
|
|
+ -moz-user-select: none;
|
|
|
+ -ms-user-select: none;
|
|
|
&-box {
|
|
|
float: left;
|
|
|
> span {
|
|
@@ -830,12 +1131,12 @@ export default {
|
|
|
&.textLeft {
|
|
|
text-align: left;
|
|
|
}
|
|
|
- &.wordBlank {
|
|
|
- color: rgba(0, 0, 0, 0.85);
|
|
|
- }
|
|
|
&.font-white {
|
|
|
color: #fff;
|
|
|
}
|
|
|
+ &.wordBlank {
|
|
|
+ color: rgba(0, 0, 0, 0.85);
|
|
|
+ }
|
|
|
}
|
|
|
&.NNPE-chs {
|
|
|
font-family: "FZJCGFKTK";
|
|
@@ -843,12 +1144,21 @@ export default {
|
|
|
line-height: 56px;
|
|
|
padding-bottom: 16px;
|
|
|
color: rgba(0, 0, 0, 0.85);
|
|
|
-
|
|
|
+ .font-white {
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
.active {
|
|
|
color: #de4444;
|
|
|
+ &-yellow {
|
|
|
+ color: #ffc600;
|
|
|
+ }
|
|
|
}
|
|
|
- .font-white {
|
|
|
- color: #fff;
|
|
|
+
|
|
|
+ .wordActive {
|
|
|
+ color: #de4444;
|
|
|
+ }
|
|
|
+ .wordActive-blue {
|
|
|
+ color: #ffc600;
|
|
|
}
|
|
|
}
|
|
|
// &.padding {
|
|
@@ -871,6 +1181,9 @@ export default {
|
|
|
line-height: 40px;
|
|
|
height: 40px;
|
|
|
color: rgba(0, 0, 0, 0.85);
|
|
|
+ &.font-white {
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
&.noFont {
|
|
|
font-family: initial;
|
|
|
}
|
|
@@ -880,9 +1193,6 @@ export default {
|
|
|
&.wordBlank {
|
|
|
color: rgba(0, 0, 0, 0.85);
|
|
|
}
|
|
|
- &.font-white {
|
|
|
- color: #fff;
|
|
|
- }
|
|
|
}
|
|
|
&.NNPE-chs {
|
|
|
font-family: "FZJCGFKTK";
|
|
@@ -890,11 +1200,20 @@ export default {
|
|
|
line-height: 56px;
|
|
|
padding-bottom: 16px;
|
|
|
color: rgba(0, 0, 0, 0.85);
|
|
|
+ .font-white {
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
.active {
|
|
|
color: #de4444;
|
|
|
+ &-yellow {
|
|
|
+ color: #ffc600;
|
|
|
+ }
|
|
|
}
|
|
|
- .font-white {
|
|
|
- color: #fff;
|
|
|
+ .wordActive {
|
|
|
+ color: #de4444;
|
|
|
+ }
|
|
|
+ .wordActive-blue {
|
|
|
+ color: #ffc600;
|
|
|
}
|
|
|
}
|
|
|
&.padding {
|
|
@@ -945,6 +1264,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.word-play-audio {
|
|
|
+ position: absolute;
|
|
|
+ left: -1000px;
|
|
|
+}
|
|
|
</style>
|
|
|
<style lang="scss">
|
|
|
.NPC-Big-Book-preview-green {
|