From f9ce713d1e1b0f0c63ad6b65418b9a8eea4d3539 Mon Sep 17 00:00:00 2001 From: mackt <1033530438@qq.com> Date: Mon, 29 Apr 2024 22:31:22 +0800 Subject: [PATCH] fix: eslint --- src/components/AudioPlayer/widget/SongList.tsx | 3 +-- src/components/SongCard/SongCard.tsx | 15 +-------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/components/AudioPlayer/widget/SongList.tsx b/src/components/AudioPlayer/widget/SongList.tsx index 173a08f..204895b 100644 --- a/src/components/AudioPlayer/widget/SongList.tsx +++ b/src/components/AudioPlayer/widget/SongList.tsx @@ -66,7 +66,7 @@ export default function SongCardList({ height, listInfo, songList, className, co setAudioId(id); }; - function Item({ index, style }: { index: number; style: React.CSSProperties }) { + function Item({ index }: { index: number }) { const item = songList[index]; return (
@@ -77,7 +77,6 @@ export default function SongCardList({ height, listInfo, songList, className, co showEq={item?.id === audioId} onPlay={handlePlayList} showCollect={collectType === 'always' || (collectType === 'playing' && item.id === audioId)} - style={style} />
); diff --git a/src/components/SongCard/SongCard.tsx b/src/components/SongCard/SongCard.tsx index f3d7d74..142b764 100644 --- a/src/components/SongCard/SongCard.tsx +++ b/src/components/SongCard/SongCard.tsx @@ -9,26 +9,13 @@ interface Props extends SongInfo { showCollect: boolean; /** 显示均衡器效果 */ showEq: boolean; - style: React.CSSProperties; onPlay: (id: string) => void; } -export default function SongCard({ - playState, - id, - title, - pic, - artist, - haveCollect, - duration, - showEq, - onPlay, - style, -}: Props) { +export default function SongCard({ playState, id, title, pic, artist, haveCollect, duration, showEq, onPlay }: Props) { return (
onPlay(id)} > {/* left */}