diff --git a/public/music.js b/public/music.js index 433312a..f69b4c5 100644 --- a/public/music.js +++ b/public/music.js @@ -157,9 +157,9 @@ export default class MusicList { this.event.onplay(item) } async stop() { - //if (!this.audio.paused) { - // this.audio.pause() - //} + if (this.audio.paused) { + return console.error('暂停播放:音乐播放器不是播放状态!') + } this.audio.pause() this.audio.src = '' this.event.onstop(this.playing)