|
@@ -86,7 +86,8 @@
|
|
|
<template v-if="mp3">
|
|
|
<voice-matrix-fullscreen-audio
|
|
|
ref="audioLine"
|
|
|
- audio-id="voiceMatrixAudio"
|
|
|
+ audio-id="voiceMatrixFullscreenAudio"
|
|
|
+ :is-repeat="isRepeat"
|
|
|
:bg-index="bgIndex"
|
|
|
:mp3="mp3"
|
|
|
:get-cur-time="getCurTime"
|
|
@@ -99,15 +100,13 @@
|
|
|
</template>
|
|
|
<div
|
|
|
:class="['op-btn', bgIndex === 1 ? 'op-btn-green' : '']"
|
|
|
- @click="setStatus"
|
|
|
+ @click="changeLoopState"
|
|
|
>
|
|
|
<span
|
|
|
:class="[
|
|
|
'repeat-icon',
|
|
|
- !isRepeat && !isAuto ? 'disabled' : '',
|
|
|
- isRepeat && !isAuto ? 'auto-icon' : '',
|
|
|
- !isRepeat && bgIndex === 1 ? 'repeat-icon-yellow' : '',
|
|
|
- isRepeat && !isAuto && bgIndex === 1 ? 'auto-icon-yellow' : ''
|
|
|
+ !isRepeat ? 'disabled' : 'auto-icon',
|
|
|
+ isRepeat && bgIndex === 1 ? 'auto-icon-yellow' : ''
|
|
|
]"
|
|
|
/>
|
|
|
</div>
|
|
@@ -283,22 +282,56 @@
|
|
|
v-for="({ chs, pinyin }, w) in column.sentence_data.wordsList"
|
|
|
>
|
|
|
<span
|
|
|
- :key="`${column.sentence_data.pyPosition === 'top' ? 'pinyin' : 'chs'}-${w}`"
|
|
|
- :style="{visibility: column.sentence_data.pyPosition === 'top' && isShowPY ? 'visible' : 'hidden'}"
|
|
|
- :class="column.sentence_data.pyPosition === 'top' ? 'pinyin' : 'chs'"
|
|
|
+ :key="
|
|
|
+ `${
|
|
|
+ column.sentence_data.pyPosition === 'top'
|
|
|
+ ? 'pinyin'
|
|
|
+ : 'chs'
|
|
|
+ }-${w}`
|
|
|
+ "
|
|
|
+ :style="{
|
|
|
+ visibility:
|
|
|
+ column.sentence_data.pyPosition === 'top' && isShowPY
|
|
|
+ ? 'visible'
|
|
|
+ : 'hidden'
|
|
|
+ }"
|
|
|
+ :class="
|
|
|
+ column.sentence_data.pyPosition === 'top'
|
|
|
+ ? 'pinyin'
|
|
|
+ : 'chs'
|
|
|
+ "
|
|
|
>
|
|
|
- {{ column.sentence_data.pyPosition === 'top' ? pinyin : chs }}
|
|
|
+ {{
|
|
|
+ column.sentence_data.pyPosition === "top" ? pinyin : chs
|
|
|
+ }}
|
|
|
</span>
|
|
|
</template>
|
|
|
<template
|
|
|
v-for="({ chs, pinyin }, w) in column.sentence_data.wordsList"
|
|
|
>
|
|
|
<span
|
|
|
- :key="`${column.sentence_data.pyPosition === 'top' ? 'chs' : 'pinyin'}-${w}`"
|
|
|
- :style="{visibility: column.sentence_data.pyPosition !== 'top' && isShowPY ? 'hidden' : 'visible'}"
|
|
|
- :class="column.sentence_data.pyPosition === 'top' ? 'chs' : 'pinyin'"
|
|
|
+ :key="
|
|
|
+ `${
|
|
|
+ column.sentence_data.pyPosition === 'top'
|
|
|
+ ? 'chs'
|
|
|
+ : 'pinyin'
|
|
|
+ }-${w}`
|
|
|
+ "
|
|
|
+ :style="{
|
|
|
+ visibility:
|
|
|
+ column.sentence_data.pyPosition !== 'top' && isShowPY
|
|
|
+ ? 'hidden'
|
|
|
+ : 'visible'
|
|
|
+ }"
|
|
|
+ :class="
|
|
|
+ column.sentence_data.pyPosition === 'top'
|
|
|
+ ? 'chs'
|
|
|
+ : 'pinyin'
|
|
|
+ "
|
|
|
>
|
|
|
- {{ column.sentence_data.pyPosition === 'top' ? chs : pinyin }}
|
|
|
+ {{
|
|
|
+ column.sentence_data.pyPosition === "top" ? chs : pinyin
|
|
|
+ }}
|
|
|
</span>
|
|
|
</template>
|
|
|
</div>
|
|
@@ -325,12 +358,13 @@
|
|
|
@click="matrixCellClick(i, j)"
|
|
|
>
|
|
|
<div class="inside-wrapper">
|
|
|
- <div
|
|
|
- class="pinyin"
|
|
|
- >
|
|
|
+ <div class="pinyin">
|
|
|
{{ column.pinyin_english_data.pinyin }}
|
|
|
</div>
|
|
|
- <div class="english" :style="{visibility: isShowEN ? 'visible' : 'hidden'}">
|
|
|
+ <div
|
|
|
+ class="english"
|
|
|
+ :style="{ visibility: isShowEN ? 'visible' : 'hidden' }"
|
|
|
+ >
|
|
|
{{ column.pinyin_english_data.english }}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -454,8 +488,6 @@ export default {
|
|
|
isShow: false,
|
|
|
curWordTime: 0,
|
|
|
playing: false,
|
|
|
- isAuto: false,
|
|
|
- autoCount: 0,
|
|
|
key: "isRepeat",
|
|
|
isKeyboard: true,
|
|
|
isTopShow: false,
|
|
@@ -662,6 +694,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
playAudio() {
|
|
|
+ console.log(this.hasSelectedCell);
|
|
|
if (!this.hasSelectedCell) return;
|
|
|
if (this.playing) return this.handleParentPlay();
|
|
|
if (this.lrcArray.length > 0) return this.$refs.audioLine.PlayAudio();
|
|
@@ -716,16 +749,6 @@ export default {
|
|
|
if (this.isRepeat) {
|
|
|
return this.lrcPlay(this.lrcArray[0], 0);
|
|
|
}
|
|
|
- // 单次循环
|
|
|
- if (this.isAuto && this.autoCount === 1) {
|
|
|
- this.autoCount = 0;
|
|
|
- this.lrcArray = [];
|
|
|
- return;
|
|
|
- }
|
|
|
- if (this.isAuto && this.autoCount === 0) {
|
|
|
- this.autoCount += 1;
|
|
|
- return this.lrcPlay(this.lrcArray[0], 0);
|
|
|
- }
|
|
|
|
|
|
this.lrcArray = [];
|
|
|
}
|
|
@@ -816,6 +839,9 @@ export default {
|
|
|
this.$refs.audioLine.onTimeupdateTime(end);
|
|
|
this.unWatch();
|
|
|
this.unWatch = null;
|
|
|
+ if (this.isRepeat) {
|
|
|
+ this.handleChangeTime({ begin_time, end_time });
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
});
|
|
@@ -905,24 +931,8 @@ export default {
|
|
|
changeStatus(key) {
|
|
|
this[key] = !this[key];
|
|
|
},
|
|
|
- setStatus() {
|
|
|
- if (this.key === "isRepeat") {
|
|
|
- if (this.isRepeat) {
|
|
|
- this.isRepeat = false;
|
|
|
- this.isAuto = true;
|
|
|
- this.autoCount = 0;
|
|
|
- this.key = "isAuto";
|
|
|
- } else {
|
|
|
- this.isRepeat = true;
|
|
|
- this.key = "isRepeat";
|
|
|
- }
|
|
|
- } else if (this.key === "isAuto") {
|
|
|
- if (this.isAuto) {
|
|
|
- this.isRepeat = false;
|
|
|
- this.isAuto = false;
|
|
|
- this.key = "isRepeat";
|
|
|
- }
|
|
|
- }
|
|
|
+ changeLoopState() {
|
|
|
+ this.isRepeat = !this.isRepeat;
|
|
|
},
|
|
|
getRerordStatus(bool) {
|
|
|
this.isShowCompare = bool;
|
|
@@ -1295,7 +1305,7 @@ $dark-color-play: #fff2c6;
|
|
|
left top;
|
|
|
background-size: 100% 100%;
|
|
|
&.disabled {
|
|
|
- background: url("../../../assets/icon/Repeat-24-disable-Black.png")
|
|
|
+ background: url("../../../assets/icon/auto-24-disable-black.png")
|
|
|
no-repeat left top;
|
|
|
background-size: 100% 100%;
|
|
|
}
|