From 34d45bb3b81ef2f11e8ea9d7bb3b5e2800656015 Mon Sep 17 00:00:00 2001 From: t0ng7u Date: Thu, 24 Jul 2025 23:28:55 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8D=AD=20style(ui):=20Optimize=20style=20?= =?UTF-8?q?layout=20and=20improve=20responsive=20layout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layout/header/PricingCategoryIntro.jsx | 42 ++++++++++--------- .../header/PricingCategoryIntroSkeleton.jsx | 10 ++--- .../view/card/PricingCardView.jsx | 2 +- 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/web/src/components/table/model-pricing/layout/header/PricingCategoryIntro.jsx b/web/src/components/table/model-pricing/layout/header/PricingCategoryIntro.jsx index df1e3c97..47cac58c 100644 --- a/web/src/components/table/model-pricing/layout/header/PricingCategoryIntro.jsx +++ b/web/src/components/table/model-pricing/layout/header/PricingCategoryIntro.jsx @@ -104,7 +104,7 @@ const PricingCategoryIntro = ({ })); return ( -
+
{fallbackCategories.map((item) => ( +
( -
+
{category.icon && React.cloneElement(category.icon, { size: 40 })}
); @@ -171,20 +171,22 @@ const PricingCategoryIntro = ({ if (activeKey === 'all') { return (
- -
+ +
{/* 全部模型的头像组合 */} - {renderAllModelsAvatar()} +
+ {renderAllModelsAvatar()} +
{/* 分类信息 */} -
-
-

{modelCategories.all.label}

- +
+
+

{modelCategories.all.label}

+ {t('共 {{count}} 个模型', { count: modelCount })}
-

+

{getCategoryDescription(activeKey)}

@@ -202,20 +204,22 @@ const PricingCategoryIntro = ({ return (
- -
+ +
{/* 分类图标 */} - {renderCategoryAvatar(currentCategory)} +
+ {renderCategoryAvatar(currentCategory)} +
{/* 分类信息 */} -
-
-

{currentCategory.label}

- +
+
+

{currentCategory.label}

+ {t('共 {{count}} 个模型', { count: modelCount })}
-

+

{getCategoryDescription(activeKey)}

diff --git a/web/src/components/table/model-pricing/layout/header/PricingCategoryIntroSkeleton.jsx b/web/src/components/table/model-pricing/layout/header/PricingCategoryIntroSkeleton.jsx index 06d029ef..8ae719df 100644 --- a/web/src/components/table/model-pricing/layout/header/PricingCategoryIntroSkeleton.jsx +++ b/web/src/components/table/model-pricing/layout/header/PricingCategoryIntroSkeleton.jsx @@ -25,10 +25,10 @@ const PricingCategoryIntroSkeleton = ({ }) => { const placeholder = (
- -
+ +
{/* 分类图标骨架 */} -
+
{isAllModels ? (
{Array.from({ length: 5 }).map((_, index) => ( @@ -50,8 +50,8 @@ const PricingCategoryIntroSkeleton = ({
{/* 分类信息骨架 */} -
-
+
+
diff --git a/web/src/components/table/model-pricing/view/card/PricingCardView.jsx b/web/src/components/table/model-pricing/view/card/PricingCardView.jsx index 29e1786a..e107df79 100644 --- a/web/src/components/table/model-pricing/view/card/PricingCardView.jsx +++ b/web/src/components/table/model-pricing/view/card/PricingCardView.jsx @@ -26,7 +26,7 @@ import PricingCardSkeleton from './PricingCardSkeleton'; import { useMinimumLoadingTime } from '../../../../../hooks/common/useMinimumLoadingTime'; const CARD_STYLES = { - container: "w-12 h-12 rounded-2xl flex items-center justify-center relative shadow-sm", + container: "w-12 h-12 rounded-2xl flex items-center justify-center relative shadow-md", icon: "w-8 h-8 flex items-center justify-center", selected: "border-blue-500 bg-blue-50", default: "border-gray-200 hover:border-gray-300"