diff --git a/src/components/common/SongItem.vue b/src/components/common/SongItem.vue index 8b0cfe2..ec414b3 100644 --- a/src/components/common/SongItem.vue +++ b/src/components/common/SongItem.vue @@ -75,6 +75,9 @@ const emits = defineEmits(['play']); const songImageRef = useTemplateRef('songImg'); const imageLoad = async () => { + if (!songImageRef.value) { + return; + } const background = await getImageBackground((songImageRef.value as any).imageRef as unknown as HTMLImageElement); // eslint-disable-next-line vue/no-mutating-props props.item.backgroundColor = background; diff --git a/src/layout/components/PlayBar.vue b/src/layout/components/PlayBar.vue index f095233..c3fda07 100644 --- a/src/layout/components/PlayBar.vue +++ b/src/layout/components/PlayBar.vue @@ -73,7 +73,15 @@ 歌词 - +