diff --git a/src/store/modules/acrou/modules/aplayer.js b/src/store/modules/acrou/modules/aplayer.js index 1a7d7de..5f9e6d7 100644 --- a/src/store/modules/acrou/modules/aplayer.js +++ b/src/store/modules/acrou/modules/aplayer.js @@ -13,7 +13,6 @@ export default { add({ state, dispatch }, { audio, play }) { return new Promise((resolve) => { var index = state.openedAudios.findIndex((s) => s.id === audio.id); - console.log(index); if (index >= 0) { state.openedAudios.splice(index, 1); state.player.list.remove(index + state.customAudios.length || 0); diff --git a/src/views/common/APlayer.vue b/src/views/common/APlayer.vue index 49dfd7b..b22795e 100644 --- a/src/views/common/APlayer.vue +++ b/src/views/common/APlayer.vue @@ -18,7 +18,7 @@ export default { }); }, computed: { - ...mapState("acrou/aplayer", ["player", "audios"]), + ...mapState("acrou/aplayer", ["player", "audios", "openedAudios"]), container() { return document.getElementById("aplayer"); }, @@ -36,7 +36,7 @@ export default { }; }, show() { - return this.audios && this.audios.length > 0; + return (this.audios && this.audios.length > 0) || (this.openedAudios && this.openedAudios.length > 0); }, }, methods: {