mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-28 10:57:23 +08:00
🐞 fix: 修复历史播放 不触发播放列表问题
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
:class="setAnimationClass('animate__bounceIn')"
|
:class="setAnimationClass('animate__bounceIn')"
|
||||||
:style="setAnimationDelay(index, 30)"
|
:style="setAnimationDelay(index, 30)"
|
||||||
>
|
>
|
||||||
<song-item class="history-item-content" :item="item" />
|
<song-item class="history-item-content" :item="item" @play="handlePlay" />
|
||||||
<div class="history-item-count">
|
<div class="history-item-count">
|
||||||
{{ item.count }}
|
{{ item.count }}
|
||||||
</div>
|
</div>
|
||||||
@@ -24,6 +24,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { useStore } from 'vuex';
|
||||||
|
|
||||||
import { useMusicHistory } from '@/hooks/MusicHistoryHook';
|
import { useMusicHistory } from '@/hooks/MusicHistoryHook';
|
||||||
import { setAnimationClass, setAnimationDelay } from '@/utils';
|
import { setAnimationClass, setAnimationDelay } from '@/utils';
|
||||||
|
|
||||||
@@ -31,7 +33,12 @@ defineOptions({
|
|||||||
name: 'History',
|
name: 'History',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const store = useStore();
|
||||||
const { delMusic, musicList } = useMusicHistory();
|
const { delMusic, musicList } = useMusicHistory();
|
||||||
|
|
||||||
|
const handlePlay = () => {
|
||||||
|
store.commit('setPlayList', musicList.value);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
Reference in New Issue
Block a user