mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-23 15:47:23 +08:00
🐞 fix: 修复各种报错问题
This commit is contained in:
@@ -50,7 +50,6 @@ const handleClick = async () => {
|
||||
if (props.item.type === '专辑') {
|
||||
showPop.value = true;
|
||||
const res = await getAlbum(props.item.id);
|
||||
console.log('res.data', res.data);
|
||||
songList.value = res.data.songs.map((song: any) => {
|
||||
song.al.picUrl = song.al.picUrl || props.item.picUrl;
|
||||
return song;
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
</div>
|
||||
<div class="song-item-content-name">
|
||||
<n-ellipsis class="text-ellipsis" line-clamp="1">
|
||||
<span v-for="(artists, artistsindex) in item.song.artists" :key="artistsindex"
|
||||
>{{ artists.name }}{{ artistsindex < item.song.artists.length - 1 ? ' / ' : '' }}</span
|
||||
<span v-for="(artists, artistsindex) in item.artists" :key="artistsindex"
|
||||
>{{ artists.name }}{{ artistsindex < item.artists.length - 1 ? ' / ' : '' }}</span
|
||||
>
|
||||
</n-ellipsis>
|
||||
</div>
|
||||
@@ -32,12 +32,12 @@
|
||||
<script lang="ts" setup>
|
||||
import { useStore } from 'vuex';
|
||||
|
||||
import type { SongResult } from '@/type/music';
|
||||
import type { Song } from '@/type/music';
|
||||
import { getImgUrl } from '@/utils';
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
item: SongResult;
|
||||
item: Song;
|
||||
mini?: boolean;
|
||||
}>(),
|
||||
{
|
||||
@@ -61,7 +61,7 @@ const isPlaying = computed(() => {
|
||||
const emits = defineEmits(['play']);
|
||||
|
||||
// 播放音乐 设置音乐详情 打开音乐底栏
|
||||
const playMusicEvent = async (item: SongResult) => {
|
||||
const playMusicEvent = async (item: Song) => {
|
||||
if (playMusic.value.id === item.id) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user