diff --git a/src/components/MusicList.vue b/src/components/MusicList.vue
index 7304127..d778f10 100644
--- a/src/components/MusicList.vue
+++ b/src/components/MusicList.vue
@@ -10,77 +10,69 @@
>
diff --git a/src/main.ts b/src/main.ts
index fb5321d..18e930c 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -15,7 +15,7 @@ import directives from './directive';
const app = createApp(App);
Object.keys(directives).forEach((key: string) => {
- app.directive(key, directives[key]);
+ app.directive(key, directives[key as keyof typeof directives]);
});
app.use(router);
app.use(store);
diff --git a/src/views/list/index.vue b/src/views/list/index.vue
index 5f5f023..70f80ae 100644
--- a/src/views/list/index.vue
+++ b/src/views/list/index.vue
@@ -96,7 +96,7 @@ const handleScroll = (e: any) => {
// 监听窗口大小变化,调整每行显示数量
const updateItemsPerRow = () => {
const width = window.innerWidth;
- if (width > 1800) ITEMS_PER_ROW.value = 10;
+ if (width > 1800) ITEMS_PER_ROW.value = 8;
else if (width > 1200) ITEMS_PER_ROW.value = 8;
else if (width > 768) ITEMS_PER_ROW.value = 6;
else ITEMS_PER_ROW.value = 5;
diff --git a/src/views/user/index.vue b/src/views/user/index.vue
index 35f0ad9..9ad7d06 100644
--- a/src/views/user/index.vue
+++ b/src/views/user/index.vue
@@ -57,12 +57,18 @@ onActivated(() => {
const isShowList = ref(false);
const list = ref();
+const listLoading = ref(false);
// 展示歌单
-const showPlaylist = async (id: number) => {
+const showPlaylist = async (id: number, name: string) => {
isShowList.value = true;
- list.value = {};
+ listLoading.value = true;
+
+ list.value = {
+ name,
+ } as Playlist;
const { data } = await getListDetail(id);
list.value = data.playlist;
+ listLoading.value = false;
};
const handlePlay = () => {
@@ -103,7 +109,12 @@ const handlePlay = () => {
创建的歌单
-
+
{{ item.name }}
@@ -133,7 +144,13 @@ const handlePlay = () => {
-
+