mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-14 14:50:50 +08:00
fix: 修复切换收藏和不喜欢状态时事件处理逻辑
This commit is contained in:
@@ -74,7 +74,7 @@ export function useSongItem(props: {
|
||||
|
||||
// 切换收藏状态
|
||||
const toggleFavorite = async (e: Event) => {
|
||||
e.stopPropagation();
|
||||
e && e.stopPropagation();
|
||||
const numericId = typeof props.item.id === 'string' ? parseInt(props.item.id, 10) : props.item.id;
|
||||
|
||||
if (isFavorite.value) {
|
||||
@@ -86,7 +86,7 @@ export function useSongItem(props: {
|
||||
|
||||
// 切换不喜欢状态
|
||||
const toggleDislike = async (e: Event) => {
|
||||
e.stopPropagation();
|
||||
e && e.stopPropagation();
|
||||
if (isDislike.value) {
|
||||
playerStore.removeFromDislikeList(props.item.id);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user