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