From e16ca48c4aafdbc7173c68777e43696ebdf57cf5 Mon Sep 17 00:00:00 2001 From: nisen Date: Tue, 21 Nov 2023 17:11:05 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9F=B3=E9=A2=91=E8=87=AA=E5=8A=A8=E7=BB=93?= =?UTF-8?q?=E6=9D=9F=E6=B8=85=E9=99=A4=E8=AE=A1=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/audio-player/audio-player.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/audio-player/audio-player.vue b/components/audio-player/audio-player.vue index 39beb18..97297b5 100644 --- a/components/audio-player/audio-player.vue +++ b/components/audio-player/audio-player.vue @@ -153,6 +153,8 @@ this.audioContext.play(); this.playing=true; this.currentTime=this.formatSeconds(second); + // 重新计时 + this.$emit("onPlay",this.audioContext); }, onPlayerPlay(){ //console.log('开始播放'); @@ -183,7 +185,11 @@ this.checkSecond=intTime; this.$emit("onPlaying",this.audioContext,intTime); } - + // 相等的时候,关闭计时 + if(this.currentTime == this.allTime){ + //图标变换 + this.onPlayerEnded() + } } }, onPlayerEnded(){