feat: 修改音乐列表为页面,优化专辑和歌单详情加载逻辑,支持通过路由跳转展示音乐列表

This commit is contained in:
alger
2025-05-07 22:36:52 +08:00
parent 3ca7e9a271
commit e2527c3fb8
15 changed files with 1208 additions and 259 deletions
+12 -6
View File
@@ -62,20 +62,26 @@ import InstallAppModal from '@/components/common/InstallAppModal.vue';
import PlayBottom from '@/components/common/PlayBottom.vue';
import UpdateModal from '@/components/common/UpdateModal.vue';
import homeRouter from '@/router/home';
import otherRouter from '@/router/other';
import { useMenuStore } from '@/store/modules/menu';
import { usePlayerStore } from '@/store/modules/player';
import { useSettingsStore } from '@/store/modules/settings';
import { isElectron, isMobile } from '@/utils';
const keepAliveInclude = computed(() =>
homeRouter
const keepAliveInclude = computed(() => {
const allRoutes = [...homeRouter, ...otherRouter];
return allRoutes
.filter((item) => {
return item.meta.keepAlive;
return item.meta?.keepAlive;
})
.map((item) => {
return item.name.charAt(0).toUpperCase() + item.name.slice(1);
return typeof item.name === 'string'
? item.name.charAt(0).toUpperCase() + item.name.slice(1)
: '';
})
);
.filter(Boolean);
});
const AppMenu = defineAsyncComponent(() => import('./components/AppMenu.vue'));
const PlayBar = defineAsyncComponent(() => import('@/components/player/PlayBar.vue'));
@@ -142,7 +148,7 @@ provide('openPlaylistDrawer', openPlaylistDrawer);
.mobile {
.main-content {
height: calc(100vh - 154px);
height: calc(100vh - 130px);
overflow: auto;
display: block;
flex: none;