mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-03 14:20:50 +08:00
15 lines
463 B
Vue
15 lines
463 B
Vue
<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> |