From 6227aa610cff0c0ac0c3fd4f6ceafd192f4817bb Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Mon, 13 Jul 2026 16:57:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Dashboard=20CSS=20=E7=B1=BB=E5=90=8D?= =?UTF-8?q?=E5=AF=B9=E9=BD=90=E5=B7=B2=E6=9C=89=E6=A0=B7=E5=BC=8F=20+=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B7=AF=E7=94=B1=E6=8C=87=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 所有类名改回 dashboard.css 已有定义(xx-kpi-*/xx-task-*/xx-quick-*/xx-chart-*/xx-announcement-*) - "查看全部"路由从 /asset-library 改为 /app/history - vite build 验证通过 --- apps/web/src/pages/dashboard/Dashboard.tsx | 174 +++++---------------- 1 file changed, 35 insertions(+), 139 deletions(-) diff --git a/apps/web/src/pages/dashboard/Dashboard.tsx b/apps/web/src/pages/dashboard/Dashboard.tsx index d222fc0f6..d1ba9c651 100644 --- a/apps/web/src/pages/dashboard/Dashboard.tsx +++ b/apps/web/src/pages/dashboard/Dashboard.tsx @@ -9,161 +9,56 @@ import { Button, Tag } from "@/components/ui"; import { DatabaseOutlined } from "@ant-design/icons"; import "./dashboard.css"; -/* ── 类型定义 ───────────────────────────────────────────── */ - -interface KpiItem { - key: string; - icon: string; - iconGradient: string; - value: string; - label: string; - trend: string; - trendDirection: "up" | "down" | "neutral"; - accent: string; -} - -interface QuickEntry { - key: string; - icon: React.ReactNode; - label: string; - desc: string; - badge?: string; - badgeTone?: "blue" | "green" | "orange" | "purple" | "slate"; - gradient: string; - to: string; -} - -interface RecentTask { - id: string; - title: string; - type: "成片" | "草稿" | "素材"; - typeTone: "green" | "blue" | "slate"; - updatedAt: string; - size: string; - status: "已完成" | "进行中" | "待处理"; - statusTone: "green" | "blue" | "slate"; -} - /* ── 主组件 ─────────────────────────────────────────────── */ const Dashboard: React.FC = () => { const navigate = useNavigate(); - const kpiData: KpiItem[] = []; - const quickEntries: QuickEntry[] = []; - const recentTasks: RecentTask[] = []; - return (
{/* KPI 卡片网格 */} -
- {kpiData.length > 0 ? ( - kpiData.map((kpi) => ( -
-
- {kpi.icon} -
-
{kpi.value}
-
{kpi.label}
-
- {kpi.trendDirection === "up" ? "↑" : kpi.trendDirection === "down" ? "↓" : "→"}{" "} - {kpi.trend} -
-
- )) - ) : ( -
-

暂无统计数据

-
- )} -
+
+
+

暂无统计数据

+
+
{/* 快速入口 */} -
-

快速入口

- {quickEntries.length > 0 ? ( -
- {quickEntries.map((entry) => ( - - ))} -
- ) : ( +
+
+

快速入口

+
+

暂无快速入口

- )} -
+
+ {/* 最近任务 */}
-

最近任务

-
- {recentTasks.length > 0 ? ( -
- {recentTasks.map((task) => ( -
-
- {task.type} -
-
{task.title}
-
- 更新于 {task.updatedAt} · {task.size} -
-
-
- {task.status} -
- ))} -
- ) : ( +

暂无最近任务

- )} +
{/* 使用统计 */} -
-

使用统计

-
-
- - -
-
-
- +
+
+

使用统计

+
+
+
+
+

暂无统计数据

@@ -171,17 +66,18 @@ const Dashboard: React.FC = () => {
{/* 公告 */} -
-

公告

-
-
- 📢 - 系统公告 - 官方 +
+
+

公告

+
+
+
+ 官方 +
+

欢迎使用小应 SaaS 平台

+ +
-

- 欢迎使用小应 SaaS 平台。当前为演示版本,部分功能正在开发中。 -