修改删除正在播放列表的Bug
This commit is contained in:
parent
9c7b484b36
commit
d40c8eea47
@ -106,8 +106,8 @@ const options = [
|
|||||||
// key: "nextToPlay",
|
// key: "nextToPlay",
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
type: 'divider',
|
type: "divider",
|
||||||
key: ''
|
key: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "从列表删除",
|
label: "从列表删除",
|
||||||
@ -118,19 +118,21 @@ const options = [
|
|||||||
// 处理菜单选择
|
// 处理菜单选择
|
||||||
const handleSelect = (key, id) => {
|
const handleSelect = (key, id) => {
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'play':
|
case "play":
|
||||||
pubsub.publish('zp.play',{
|
pubsub.publish("zp.play", {
|
||||||
id, im: true,
|
id,
|
||||||
})
|
im: true,
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
case 'nextToPlay':
|
case "nextToPlay":
|
||||||
break;
|
break;
|
||||||
case 'remove':
|
case "remove":
|
||||||
store.commit('removePlayingList', {id})
|
store.commit("removePlayingList", { id });
|
||||||
if(playingList.value.length>0)
|
if (playingList.value.length > 0){
|
||||||
pubsub.publish('zp.next')
|
if (store.state.settings.songId == id)
|
||||||
else
|
pubsub.publish("zp.next");
|
||||||
pubsub.publish('zp.stop')
|
}
|
||||||
|
else pubsub.publish("zp.stop");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -139,8 +141,8 @@ const handleClick = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const arLeave = () => {
|
const arLeave = () => {
|
||||||
pubsub.publish('zp.togglePlaying',)
|
pubsub.publish("zp.togglePlaying");
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user