fix: 审查修补前端布局重构并归档 change
- 补实现 ProtectedRoute 空壳组件(预留接口,不启用认证逻辑) - 修复页面组件内联 style 为 CSS 类,符合样式规范 - 补充 Sidebar 菜单项激活状态测试、404 按钮可点击测试 - 回写 admin-layout spec Header 页面标题 fallback 行为 - 同步 delta specs 至主规范(admin-layout、frontend-routing、app-constants) - 归档 refactor-frontend-layout change
This commit is contained in:
@@ -11,7 +11,7 @@ export function NotFoundPage() {
|
||||
|
||||
return (
|
||||
<Space align="center" className="not-found-page" direction="vertical" size="large">
|
||||
<ErrorCircleIcon size="64px" style={{ color: "var(--td-warning-color)" }} />
|
||||
<ErrorCircleIcon className="not-found-icon" size="64px" />
|
||||
<h1>404</h1>
|
||||
<p>您访问的页面不存在</p>
|
||||
<Button onClick={handleGoHome} theme="primary">
|
||||
|
||||
@@ -14,7 +14,7 @@ export function DashboardPage() {
|
||||
});
|
||||
|
||||
return (
|
||||
<Space direction="vertical" size="large" style={{ width: "100%" }}>
|
||||
<Space className="full-width-space" direction="vertical" size="large">
|
||||
<h2>欢迎使用 {APP.title}</h2>
|
||||
<p>在此构建你的应用。以下是 /health API 的返回数据(前后端联调示例):</p>
|
||||
{health && <pre className="health-response">{JSON.stringify(health, null, 2)}</pre>}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Card, Space } from "tdesign-react";
|
||||
|
||||
export function SettingsPage() {
|
||||
return (
|
||||
<Space direction="vertical" size="large" style={{ width: "100%" }}>
|
||||
<Space className="full-width-space" direction="vertical" size="large">
|
||||
<h2>系统设置</h2>
|
||||
<Card>
|
||||
<p>页面建设中...</p>
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Card, Space } from "tdesign-react";
|
||||
|
||||
export function UsersPage() {
|
||||
return (
|
||||
<Space direction="vertical" size="large" style={{ width: "100%" }}>
|
||||
<Space className="full-width-space" direction="vertical" size="large">
|
||||
<h2>用户管理</h2>
|
||||
<Card>
|
||||
<p>页面建设中...</p>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
import { Route, Routes } from "react-router";
|
||||
|
||||
import { NotFoundPage } from "./pages/404";
|
||||
@@ -15,3 +17,7 @@ export function AppRoutes() {
|
||||
</Routes>
|
||||
);
|
||||
}
|
||||
|
||||
export function ProtectedRoute({ children }: { children: ReactNode }) {
|
||||
return children;
|
||||
}
|
||||
|
||||
@@ -86,6 +86,14 @@
|
||||
color: var(--td-text-color-disabled);
|
||||
}
|
||||
|
||||
.full-width-space {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.not-found-icon {
|
||||
color: var(--td-warning-color);
|
||||
}
|
||||
|
||||
.tabular-nums {
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user