|
@@ -13,11 +13,14 @@
|
|
|
:format-tooltip="formatProcessToolTip"
|
|
|
@change="changeCurrentTime"
|
|
|
/>
|
|
|
- <span><template v-if="audio.playing">-</template>{{
|
|
|
- audio.maxTime
|
|
|
- ? realFormatSecond(audio.maxTime - audio.currentTime)
|
|
|
- : ""
|
|
|
- }}</span>
|
|
|
+ <span
|
|
|
+ ><template v-if="audio.playing">-</template
|
|
|
+ >{{
|
|
|
+ audio.maxTime
|
|
|
+ ? realFormatSecond(audio.maxTime - audio.currentTime)
|
|
|
+ : ""
|
|
|
+ }}</span
|
|
|
+ >
|
|
|
</template>
|
|
|
<audio
|
|
|
ref="audio"
|
|
@@ -26,10 +29,10 @@
|
|
|
@timeupdate="onTimeupdate"
|
|
|
/>
|
|
|
</div>
|
|
|
- <div class="audioLine" v-else>
|
|
|
+ <div class="audioLine2" v-else>
|
|
|
<div
|
|
|
- class="play"
|
|
|
- :class="audio.playing ? 'playBtn' : 'pauseBtn'"
|
|
|
+ class="play-icon"
|
|
|
+ :class="audio.playing ? 'playBtn-icon' : 'pauseBtn-icon'"
|
|
|
@click="PlayAudio"
|
|
|
/>
|
|
|
</div>
|
|
@@ -148,7 +151,11 @@ export default {
|
|
|
let audioId = this.audioId;
|
|
|
let audio = document.getElementsByTagName("audio");
|
|
|
audio.forEach((item) => {
|
|
|
- if (item.id !== audioId) {
|
|
|
+ if (item.src == this.mp3) {
|
|
|
+ if (item.id !== audioId) {
|
|
|
+ item.pause();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
item.pause();
|
|
|
}
|
|
|
});
|
|
@@ -293,6 +300,7 @@ export default {
|
|
|
// background-size: 100% 100%;
|
|
|
// }
|
|
|
}
|
|
|
+
|
|
|
span {
|
|
|
font-size: 16px;
|
|
|
line-height: 19px;
|
|
@@ -303,6 +311,55 @@ export default {
|
|
|
text-align: right;
|
|
|
}
|
|
|
}
|
|
|
+ > .audioLine2 {
|
|
|
+ .play-icon {
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ cursor: pointer;
|
|
|
+ &.playBtn-icon {
|
|
|
+ background: url("../../../assets/NPC/icon-voice-play-red.png") no-repeat
|
|
|
+ left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ &.pauseBtn-icon {
|
|
|
+ background: url("../../../assets/NPC/play-red.png") no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.NPC-Big-Book-preview-green {
|
|
|
+ .playBtn-icon {
|
|
|
+ background: url("../../../assets/NPC/icon-voice-play-green.png") no-repeat
|
|
|
+ left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .pauseBtn-icon {
|
|
|
+ background: url("../../../assets/NPC/play-green.png") no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+}
|
|
|
+.NPC-Big-Book-preview-red {
|
|
|
+ .playBtn-icon {
|
|
|
+ background: url("../../../assets/NPC/icon-voice-play-red.png") no-repeat
|
|
|
+ left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .pauseBtn-icon {
|
|
|
+ background: url("../../../assets/NPC/play-red.png") no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+}
|
|
|
+.NPC-Big-Book-preview-brown {
|
|
|
+ .playBtn-icon {
|
|
|
+ background: url("../../../assets/NPC/icon-voice-play-brown.png") no-repeat
|
|
|
+ left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
+ .pauseBtn-icon {
|
|
|
+ background: url("../../../assets/NPC/play-brown.png") no-repeat left top;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="scss">
|