🐞 fix: 修复播放暂停控制问题 后续优化为参数监听

This commit is contained in:
alger
2024-12-12 22:36:07 +08:00
parent cebf313075
commit 7365daf700
5 changed files with 10 additions and 1 deletions
+2
View File
@@ -43,6 +43,7 @@ import { useStore } from 'vuex';
import { getTopMv } from '@/api/mv';
import MvPlayer from '@/components/MvPlayer.vue';
import { audioService } from '@/services/audioService';
import { IMvItem } from '@/type/mv';
import { formatNumber, getImgUrl, setAnimationClass, setAnimationDelay } from '@/utils';
@@ -73,6 +74,7 @@ onMounted(async () => {
const handleShowMv = async (item: IMvItem, index: number) => {
store.commit('setIsPlay', false);
store.commit('setPlayMusic', false);
audioService.getCurrentSound()?.pause();
showMv.value = true;
currentIndex.value = index;
playMvItem.value = item;