|
@@ -1,5 +1,5 @@
|
|
import { defineComponent } from 'vue'
|
|
import { defineComponent } from 'vue'
|
|
-import { Image, Skeleton } from 'vant'
|
|
|
|
|
|
+import { Image, Skeleton, Cell } from 'vant'
|
|
import request from '@/helpers/request'
|
|
import request from '@/helpers/request'
|
|
import { useAsyncState } from '@vueuse/core'
|
|
import { useAsyncState } from '@vueuse/core'
|
|
import styles from './index.module.less'
|
|
import styles from './index.module.less'
|
|
@@ -19,27 +19,36 @@ export default defineComponent({
|
|
return () => (
|
|
return () => (
|
|
<>
|
|
<>
|
|
{state.value && state.value.data.rows.length ? (
|
|
{state.value && state.value.data.rows.length ? (
|
|
- <div class={styles.albumContainer}>
|
|
|
|
- {state.value.data.rows.map(item => (
|
|
|
|
- <div
|
|
|
|
- class={styles.album}
|
|
|
|
- key={item.id}
|
|
|
|
- onClick={() => router.push('/music-album-detail/' + item.id)}
|
|
|
|
- >
|
|
|
|
- <div class={styles.main}>
|
|
|
|
- <Image class={styles.img} src={item.albumCoverUrl} />
|
|
|
|
- <p class={styles.favorite}>
|
|
|
|
- <span>{item.albumFavoriteCount}</span>人收藏
|
|
|
|
- </p>
|
|
|
|
|
|
+ <>
|
|
|
|
+ <Cell
|
|
|
|
+ class={styles.title}
|
|
|
|
+ title="专辑"
|
|
|
|
+ is-link
|
|
|
|
+ to="/music-album"
|
|
|
|
+ value="更多"
|
|
|
|
+ />
|
|
|
|
+ <div class={styles.albumContainer}>
|
|
|
|
+ {state.value.data.rows.map(item => (
|
|
|
|
+ <div
|
|
|
|
+ class={styles.album}
|
|
|
|
+ key={item.id}
|
|
|
|
+ onClick={() => router.push('/music-album-detail/' + item.id)}
|
|
|
|
+ >
|
|
|
|
+ <div class={styles.main}>
|
|
|
|
+ <Image class={styles.img} src={item.albumCoverUrl} />
|
|
|
|
+ <p class={styles.favorite}>
|
|
|
|
+ <span>{item.albumFavoriteCount}</span>人收藏
|
|
|
|
+ </p>
|
|
|
|
+ </div>
|
|
|
|
+ <h4 class={classNames(styles.title, 'van-ellipsis')}>
|
|
|
|
+ {item.albumName}
|
|
|
|
+ </h4>
|
|
</div>
|
|
</div>
|
|
- <h4 class={classNames(styles.title, 'van-ellipsis')}>
|
|
|
|
- {item.albumName}
|
|
|
|
- </h4>
|
|
|
|
- </div>
|
|
|
|
- ))}
|
|
|
|
- </div>
|
|
|
|
|
|
+ ))}
|
|
|
|
+ </div>
|
|
|
|
+ </>
|
|
) : null}
|
|
) : null}
|
|
- {isLoading.value && (
|
|
|
|
|
|
+ {/* {isLoading.value && (
|
|
<div style={{ display: 'flex' }}>
|
|
<div style={{ display: 'flex' }}>
|
|
{Array.from({ length: 4 }).map(() => (
|
|
{Array.from({ length: 4 }).map(() => (
|
|
<Skeleton
|
|
<Skeleton
|
|
@@ -52,7 +61,7 @@ export default defineComponent({
|
|
/>
|
|
/>
|
|
))}
|
|
))}
|
|
</div>
|
|
</div>
|
|
- )}
|
|
|
|
|
|
+ )} */}
|
|
</>
|
|
</>
|
|
)
|
|
)
|
|
}
|
|
}
|