feat: 添加播放列表自动滚动到播放的那个

This commit is contained in:
alger
2024-09-18 17:05:36 +08:00
parent eb2ea1981d
commit 7abc087d70
2 changed files with 23 additions and 3 deletions
+3
View File
@@ -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;