mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-24 16:27:23 +08:00
✨ feat: 优化歌词组件和移动端界面设计
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<component :is="componentToUse" v-bind="$attrs" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { isMobile } from '@/utils';
|
||||
import MusicFull from '@/components/lyric/MusicFull.vue';
|
||||
import MusicFullMobile from '@/components/lyric/MusicFullMobile.vue';
|
||||
|
||||
// 根据当前设备类型选择需要显示的组件
|
||||
const componentToUse = computed(() => {
|
||||
return isMobile.value ? MusicFullMobile : MusicFull;
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user