|
@@ -89,6 +89,7 @@ export default {
|
|
|
duioCurrentTime: null, // 剩余时间
|
|
|
count: 0,
|
|
|
loading: null,
|
|
|
+ isClick: false,
|
|
|
};
|
|
|
},
|
|
|
// 计算属性 类似于data概念
|
|
@@ -145,6 +146,7 @@ export default {
|
|
|
_this.audio.playing = false;
|
|
|
_this.audio.isPlaying = false;
|
|
|
_this.$emit("handleListenRead", false);
|
|
|
+ _this.isClick = false;
|
|
|
});
|
|
|
|
|
|
this.$nextTick(() => {
|
|
@@ -185,6 +187,7 @@ export default {
|
|
|
this.$refs[audioId].pause();
|
|
|
this.audio.playing = false;
|
|
|
this.$emit("handleListenRead", false);
|
|
|
+ this.isClick = false;
|
|
|
} else {
|
|
|
if (this.count == 0) {
|
|
|
this.audio.loading = true;
|
|
@@ -198,6 +201,7 @@ export default {
|
|
|
}
|
|
|
this.$emit("handleChangeStopAudio");
|
|
|
this.$emit("handleListenRead", true);
|
|
|
+ this.isClick = true;
|
|
|
}
|
|
|
},
|
|
|
oncanplaythrough() {
|
|
@@ -237,8 +241,15 @@ export default {
|
|
|
this.audio.currentTime = res.target.currentTime;
|
|
|
this.getCurTime(res.target.currentTime);
|
|
|
this.playValue = (this.audio.currentTime / this.audio.maxTime) * 100;
|
|
|
- if (this.audio.currentTime * 1000 > this.ed) {
|
|
|
- this.$refs[audioId].pause();
|
|
|
+ if (this.type == "audioLine") {
|
|
|
+ if (!this.isClick && this.audio.currentTime * 1000 > this.ed) {
|
|
|
+ this.$refs[audioId].pause();
|
|
|
+ this.$emit("emptyEd");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (this.audio.currentTime * 1000 > this.ed) {
|
|
|
+ this.$refs[audioId].pause();
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
onTimeupdateTime(res, playFlag) {
|