mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-23 23:57:22 +08:00
🐞 fix: 修复播放历史不展示上下一首的问题
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<n-drawer :show="show" height="70vh" placement="bottom" :drawer-style="{ backgroundColor: 'transparent' }">
|
||||
<n-drawer v-model:show="show" height="70vh" placement="bottom" :drawer-style="{ backgroundColor: 'transparent' }">
|
||||
<div class="music-page">
|
||||
<i class="iconfont icon-icon_error music-close" @click="close"></i>
|
||||
<div class="music-title">{{ name }}</div>
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useStore } from 'vuex'
|
||||
import { Playlist } from '@/type/listDetail';
|
||||
import { setAnimationClass, setAnimationDelay } from "@/utils";
|
||||
import SongItem from "@/components/common/SongItem.vue";
|
||||
import PlayBottom from './common/PlayBottom.vue';
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
import { useStore } from 'vuex'
|
||||
import type { SongResult } from '@/type/music'
|
||||
import { getImgUrl } from '@/utils'
|
||||
import { useMusicHistory } from '@/hooks/MusicHistoryHook'
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
item: SongResult
|
||||
@@ -68,15 +67,12 @@ const isPlaying = computed(() => {
|
||||
|
||||
const emits = defineEmits(['play'])
|
||||
|
||||
const musicHistory = useMusicHistory()
|
||||
|
||||
// 播放音乐 设置音乐详情 打开音乐底栏
|
||||
const playMusicEvent = (item: any) => {
|
||||
store.commit('setPlay', item)
|
||||
store.commit('setIsPlay', true)
|
||||
store.state.playListIndex = 0
|
||||
emits('play', item)
|
||||
musicHistory.addMusic(item)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user