mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-18 03:17:29 +08:00
✨ feat: 优化播放栏无法控制隐藏问题
This commit is contained in:
@@ -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>
|
||||||
@@ -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'
|
||||||
: ''
|
: ''
|
||||||
]"
|
]"
|
||||||
|
|||||||
Reference in New Issue
Block a user