From e2b2a1c973e725c0829e0862dcdea895ebd0b336 Mon Sep 17 00:00:00 2001 From: JINGYJ <1458671527@qq.com> Date: Tue, 5 Dec 2023 17:35:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A6=96=E9=A1=B5=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Welcome/components/BannerInfoCard.tsx | 24 +++++++++++++++-- src/pages/Welcome/components/FootInfoCard.tsx | 3 ++- .../Welcome/components/NavInfoCardList.tsx | 27 ++++++++++--------- src/pages/Welcome/styles/bannerInfoCard.less | 15 ++++++++++- 4 files changed, 53 insertions(+), 16 deletions(-) diff --git a/src/pages/Welcome/components/BannerInfoCard.tsx b/src/pages/Welcome/components/BannerInfoCard.tsx index 7ee9106..d36694f 100644 --- a/src/pages/Welcome/components/BannerInfoCard.tsx +++ b/src/pages/Welcome/components/BannerInfoCard.tsx @@ -28,6 +28,24 @@ const offendingTabData: Record[] = [ ]; // const topItemStyle = { marginBottom: 24, height: 190 }; // 每个卡片独立样式 +// 前三排名颜色样式 +const handleRanking = (value: number) => { + switch (value) { + case 0: + return styles.rankFirst + break; + case 1: + return styles.rankSecond + break; + case 2: + return styles.rankThird + break; + default: + return '' + break; + } +}; + /**子组件 childComp */ const RankListCard: React.FC = ({ rankingListData, @@ -38,7 +56,8 @@ const RankListCard: React.FC = ({