mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-30 12:07:22 +08:00
🔧 chore: 优化 MvPlayer 组件的关闭逻辑,简化音频暂停处理
This commit is contained in:
@@ -359,9 +359,6 @@ const loadMvUrl = async (mv: IMvItem) => {
|
|||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
emit('update:show', false);
|
emit('update:show', false);
|
||||||
if (playerStore.playMusicUrl) {
|
|
||||||
playerStore.setIsPlay(true);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleEnded = () => {
|
const handleEnded = () => {
|
||||||
|
|||||||
@@ -116,8 +116,7 @@ onMounted(async () => {
|
|||||||
|
|
||||||
const handleShowMv = async (item: IMvItem, index: number) => {
|
const handleShowMv = async (item: IMvItem, index: number) => {
|
||||||
playerStore.setIsPlay(false);
|
playerStore.setIsPlay(false);
|
||||||
playerStore.setPlayMusic(false);
|
audioService.pause();
|
||||||
audioService.getCurrentSound()?.pause();
|
|
||||||
showMv.value = true;
|
showMv.value = true;
|
||||||
currentIndex.value = index;
|
currentIndex.value = index;
|
||||||
playMvItem.value = item;
|
playMvItem.value = item;
|
||||||
|
|||||||
Reference in New Issue
Block a user