feat: 优化播放栏无法控制隐藏问题

This commit is contained in:
algerkong
2025-06-11 20:10:33 +08:00
parent f9d85f11ad
commit d227ac8b34
2 changed files with 8 additions and 2 deletions
@@ -1,5 +1,5 @@
<template> <template>
<component :is="componentToUse" v-bind="$attrs" /> <component :is="componentToUse" v-bind="$attrs" ref="musicFullRef" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@@ -12,4 +12,10 @@ import MusicFullMobile from '@/components/lyric/MusicFullMobile.vue';
const componentToUse = computed(() => { const componentToUse = computed(() => {
return isMobile.value ? MusicFullMobile : MusicFull; return isMobile.value ? MusicFullMobile : MusicFull;
}); });
const musicFullRef = ref<InstanceType<typeof MusicFull>>();
defineExpose({
musicFullRef
});
</script> </script>
+1 -1
View File
@@ -4,7 +4,7 @@
:class="[ :class="[
setAnimationClass('animate__bounceInUp'), setAnimationClass('animate__bounceInUp'),
musicFullVisible ? 'play-bar-opcity' : '', musicFullVisible ? 'play-bar-opcity' : '',
musicFullVisible && MusicFullRef?.config?.hidePlayBar musicFullVisible && MusicFullRef?.musicFullRef?.config?.hidePlayBar
? 'animate__animated animate__slideOutDown' ? 'animate__animated animate__slideOutDown'
: '' : ''
]" ]"