From 507fe08cb6a1246b6d6d50a0ac06c48fc82fdaf5 Mon Sep 17 00:00:00 2001 From: mackt <1033530438@qq.com> Date: Wed, 8 May 2024 14:07:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(PlayerCard):=20List=20=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E9=97=AA=E7=83=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AudioPlayer/PlayerCard.tsx | 4 ++-- src/components/AudioPlayer/widget/SongList.tsx | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/AudioPlayer/PlayerCard.tsx b/src/components/AudioPlayer/PlayerCard.tsx index f2e78f4..c22f6a4 100644 --- a/src/components/AudioPlayer/PlayerCard.tsx +++ b/src/components/AudioPlayer/PlayerCard.tsx @@ -8,7 +8,7 @@ import clientHttp from '@/utils/request/client'; import styles from './index.module.css'; import Lrc from './Lrc'; -import SongCardList from './widget/SongList'; +import SongList from './widget/SongList'; import { Header } from '@/components'; import { useAudioStore } from '@/store'; @@ -150,7 +150,7 @@ export default function PlayerCard({ show, className }: Prop) {
- +
diff --git a/src/components/AudioPlayer/widget/SongList.tsx b/src/components/AudioPlayer/widget/SongList.tsx index 204895b..2addefe 100644 --- a/src/components/AudioPlayer/widget/SongList.tsx +++ b/src/components/AudioPlayer/widget/SongList.tsx @@ -25,7 +25,6 @@ interface Props { /** 收藏按钮的显示逻辑 always: 总是显示 playing: 播放时显示 */ collectType?: 'always' | 'playing'; className?: string; - style?: React.CSSProperties; } export default function SongCardList({ height, listInfo, songList, className, collectType = 'always', style }: Props) { @@ -66,12 +65,11 @@ export default function SongCardList({ height, listInfo, songList, className, co setAudioId(id); }; - function Item({ index }: { index: number }) { + function Item({ index, style }: { index: number; style: React.CSSProperties }) { const item = songList[index]; return ( -
+