修改删除正在播放列表的Bug
This commit is contained in:
parent
9c7b484b36
commit
d40c8eea47
@ -106,8 +106,8 @@ const options = [
|
||||
// key: "nextToPlay",
|
||||
// },
|
||||
{
|
||||
type: 'divider',
|
||||
key: ''
|
||||
type: "divider",
|
||||
key: "",
|
||||
},
|
||||
{
|
||||
label: "从列表删除",
|
||||
@ -117,20 +117,22 @@ const options = [
|
||||
|
||||
// 处理菜单选择
|
||||
const handleSelect = (key, id) => {
|
||||
switch(key){
|
||||
case 'play':
|
||||
pubsub.publish('zp.play',{
|
||||
id, im: true,
|
||||
})
|
||||
switch (key) {
|
||||
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;
|
||||
}
|
||||
};
|
||||
@ -138,9 +140,9 @@ const handleClick = () => {
|
||||
// showDropdownRef.value = !showDropdownRef.value;
|
||||
};
|
||||
|
||||
const arLeave = ()=>{
|
||||
pubsub.publish('zp.togglePlaying',)
|
||||
}
|
||||
const arLeave = () => {
|
||||
pubsub.publish("zp.togglePlaying");
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -159,7 +161,7 @@ const arLeave = ()=>{
|
||||
@dragenter="dragenter($event, idx)"
|
||||
@dragover="dragover($event, idx)"
|
||||
@drop="drop($event, idx)"
|
||||
@dblclick="pubsub.publish('zp.play', {id: p.id,im: true})"
|
||||
@dblclick="pubsub.publish('zp.play', { id: p.id, im: true })"
|
||||
>
|
||||
<div class="icon">
|
||||
<NButton
|
||||
@ -198,7 +200,7 @@ const arLeave = ()=>{
|
||||
</span>
|
||||
</div>
|
||||
<div class="ar">
|
||||
<ArtistsSpan :artists="p.artists" :onLeave="arLeave"/>
|
||||
<ArtistsSpan :artists="p.artists" :onLeave="arLeave" />
|
||||
</div>
|
||||
<div class="al">{{ p.album.name }}</div>
|
||||
<div class="dt">
|
||||
|
Loading…
x
Reference in New Issue
Block a user