From 0960e625f98f53c33e3120a5431995c026d28d33 Mon Sep 17 00:00:00 2001 From: alanpaine Date: Thu, 16 Apr 2026 14:17:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=E4=BC=98=E5=8C=96=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=A0=87=E9=A2=98=E7=BB=84=E4=BB=B6=E5=92=8C=E4=B8=9A?= =?UTF-8?q?=E5=8A=A1=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E7=9A=84=E8=A7=86?= =?UTF-8?q?=E8=A7=89=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 重构 PageHeader 组件,移除冗余的 Space 导入,使用内联样式替代 Tailwind 类以提供更灵活的布局控制。同时,为外部应用管理和客户端管理页面引入全新的卡片设计,包括圆角、渐变背景、毛玻璃效果和自定义间距,以提升视觉层次感和现代感。调整按钮样式,统一圆角和高度,增强整体 UI 的一致性。 --- .../components/shared/PageHeader/index.tsx | 22 ++++-- .../src/pages/business/ClientManagement.tsx | 68 ++++++++++++++++--- .../pages/business/ExternalAppManagement.tsx | 66 +++++++++++++++--- 3 files changed, 131 insertions(+), 25 deletions(-) diff --git a/frontend/src/components/shared/PageHeader/index.tsx b/frontend/src/components/shared/PageHeader/index.tsx index 5cbd4e5..70cca0a 100644 --- a/frontend/src/components/shared/PageHeader/index.tsx +++ b/frontend/src/components/shared/PageHeader/index.tsx @@ -1,4 +1,4 @@ -import { Typography, Space } from 'antd'; +import { Typography } from 'antd'; import React from 'react'; const { Title, Text } = Typography; @@ -12,18 +12,28 @@ interface PageHeaderProps { const PageHeader: React.FC = ({ title, subtitle, extra, className = '' }) => { return ( -
-
- + <div + className={`page-header ${className}`} + style={{ + display: 'flex', + justifyContent: 'space-between', + alignItems: 'flex-start', + marginBottom: 24, + flexWrap: 'wrap', + gap: 16 + }} + > + <div style={{ flex: 1, minWidth: 200 }}> + <Title level={4} style={{ margin: '0 0 8px 0', fontWeight: 600 }}> {title} {subtitle && ( - + {subtitle} )}
- {extra &&
{extra}
} + {extra &&
{extra}
}
); }; diff --git a/frontend/src/pages/business/ClientManagement.tsx b/frontend/src/pages/business/ClientManagement.tsx index f52cbaf..dd8e0d6 100644 --- a/frontend/src/pages/business/ClientManagement.tsx +++ b/frontend/src/pages/business/ClientManagement.tsx @@ -1,6 +1,6 @@ import { App, Button, Card, Col, Drawer, Empty, Form, Input, InputNumber, Popconfirm, Row, Select, Space, Switch, Table, Tabs, Tag, Typography, Upload } from "antd"; import type { ColumnsType } from "antd/es/table"; -import { CloudUploadOutlined, DeleteOutlined, DownloadOutlined, EditOutlined, LaptopOutlined, MobileOutlined, PlusOutlined, ReloadOutlined, SearchOutlined, UploadOutlined } from "@ant-design/icons"; +import { CheckCircleOutlined, CloudUploadOutlined, DeleteOutlined, DownloadOutlined, EditOutlined, LaptopOutlined, MobileOutlined, PlusOutlined, ReloadOutlined, RocketOutlined, SearchOutlined, UploadOutlined, WindowsOutlined } from "@ant-design/icons"; import { useCallback, useEffect, useMemo, useState } from "react"; import PageHeader from "@/components/shared/PageHeader"; import AppPagination from "@/components/shared/AppPagination"; @@ -380,23 +380,71 @@ export default function ClientManagement() { ]; return ( -
+
- - + + + } /> - -
发布总数
{stats.total}
-
已启用
{stats.enabled}
-
最新版本
{stats.latest}
-
平台分组
{stats.groups}
+ + + +
+
+ 发布总数 + {stats.total} +
+
+ +
+
+
+ + + +
+
+ 已启用 + {stats.enabled} +
+
+ +
+
+
+ + + +
+
+ 最新版本 + {stats.latest} +
+
+ +
+
+
+ + + +
+
+ 平台分组 + {stats.groups} +
+
+ +
+
+
+
diff --git a/frontend/src/pages/business/ExternalAppManagement.tsx b/frontend/src/pages/business/ExternalAppManagement.tsx index d341aa1..8a91c26 100644 --- a/frontend/src/pages/business/ExternalAppManagement.tsx +++ b/frontend/src/pages/business/ExternalAppManagement.tsx @@ -290,23 +290,71 @@ export default function ExternalAppManagement() { ]; return ( -
+
- - + + + } /> - -
应用总数
{stats.total}
-
原生应用
{stats.native}
-
Web 应用
{stats.web}
-
已启用
{stats.enabled}
+ + + +
+
+ 应用总数 + {stats.total} +
+
+ +
+
+
+ + + +
+
+ 原生应用 + {stats.native} +
+
+ +
+
+
+ + + +
+
+ Web 应用 + {stats.web} +
+
+ +
+
+
+ + + +
+
+ 已启用 + {stats.enabled} +
+
+ +
+
+
+