修改删除正在播放列表的Bug

This commit is contained in:
zilong 2021-10-24 20:33:18 +08:00
parent 9c7b484b36
commit d40c8eea47

View File

@ -106,8 +106,8 @@ const options = [
// key: "nextToPlay",
// },
{
type: 'divider',
key: ''
type: "divider",
key: "",
},
{
label: "从列表删除",
@ -118,19 +118,21 @@ const options = [
//
const handleSelect = (key, id) => {
switch (key) {
case 'play':
pubsub.publish('zp.play',{
id, im: true,
})
case "play":
pubsub.publish("zp.play", {
id,
im: true,
});
break;
case 'nextToPlay':
case "nextToPlay":
break;
case 'remove':
store.commit('removePlayingList', {id})
if(playingList.value.length>0)
pubsub.publish('zp.next')
else
pubsub.publish('zp.stop')
case "remove":
store.commit("removePlayingList", { id });
if (playingList.value.length > 0){
if (store.state.settings.songId == id)
pubsub.publish("zp.next");
}
else pubsub.publish("zp.stop");
break;
}
};
@ -139,8 +141,8 @@ const handleClick = () => {
};
const arLeave = () => {
pubsub.publish('zp.togglePlaying',)
}
pubsub.publish("zp.togglePlaying");
};
</script>
<template>