refactor: 调整通用组件与列表项

This commit is contained in:
alger
2026-02-04 20:15:54 +08:00
parent b06459f10d
commit 6b5382e37a
8 changed files with 380 additions and 542 deletions
@@ -20,6 +20,7 @@ import { computed } from 'vue';
import type { SongResult } from '@/types/music';
import CompactSongItem from './songItemCom/CompactSongItem.vue';
import HomeSongItem from './songItemCom/HomeSongItem.vue';
import ListSongItem from './songItemCom/ListSongItem.vue';
import MiniSongItem from './songItemCom/MiniSongItem.vue';
import StandardSongItem from './songItemCom/StandardSongItem.vue';
@@ -30,6 +31,7 @@ const props = withDefaults(
mini?: boolean;
list?: boolean;
compact?: boolean;
home?: boolean;
favorite?: boolean;
selectable?: boolean;
selected?: boolean;
@@ -41,6 +43,7 @@ const props = withDefaults(
mini: false,
list: false,
compact: false,
home: false,
favorite: true,
selectable: false,
selected: false,
@@ -57,6 +60,7 @@ const renderComponent = computed(() => {
if (props.mini) return MiniSongItem;
if (props.list) return ListSongItem;
if (props.compact) return CompactSongItem;
if (props.home) return HomeSongItem;
return StandardSongItem;
});
</script>