🔧 chore: 优化 MvPlayer 组件的关闭逻辑,简化音频暂停处理

This commit is contained in:
alger
2025-05-11 01:12:47 +08:00
parent 31ea3b7e0a
commit b3de2ae785
2 changed files with 1 additions and 5 deletions

View File

@@ -359,9 +359,6 @@ const loadMvUrl = async (mv: IMvItem) => {
const handleClose = () => {
emit('update:show', false);
if (playerStore.playMusicUrl) {
playerStore.setIsPlay(true);
}
};
const handleEnded = () => {

View File

@@ -116,8 +116,7 @@ onMounted(async () => {
const handleShowMv = async (item: IMvItem, index: number) => {
playerStore.setIsPlay(false);
playerStore.setPlayMusic(false);
audioService.getCurrentSound()?.pause();
audioService.pause();
showMv.value = true;
currentIndex.value = index;
playMvItem.value = item;