1
0

feat: 优化前端布局为流动式响应式设计

- 移除 Dashboard max-width 限制,充分利用屏幕空间
- Summary Cards 和 Target Cards 改为 Flexbox wrap 流动布局
- 卡片固定宽度 280px,根据页面宽度自动调整单行数量
- 添加平滑过渡动画效果(0.3s ease)
- 移除移动端媒体查询覆盖规则
- 同步更新 card-dashboard 规格文档
This commit is contained in:
2026-05-11 16:26:51 +08:00
parent 80d5f4cdf4
commit d873484938
3 changed files with 59 additions and 37 deletions

View File

@@ -170,13 +170,13 @@ targets:
## API 端点
| 端点 | 说明 |
| ----------------------------------------------------- | --------------------------------------- |
| `GET /health` | 健康检查 |
| `GET /api/summary` | 总览统计total/up/down/lastCheckTime |
| `GET /api/targets` | 目标列表及最新状态、分组和采样数据 |
| `GET /api/targets/:id/history?from=ISO&to=ISO&page=1&pageSize=20` | 指定目标的拨测记录(时间范围 + 分页) |
| `GET /api/targets/:id/trend?from=ISO&to=ISO` | 指定目标的按小时聚合趋势 |
| 端点 | 说明 |
| ----------------------------------------------------------------- | --------------------------------------- |
| `GET /health` | 健康检查 |
| `GET /api/summary` | 总览统计total/up/down/lastCheckTime |
| `GET /api/targets` | 目标列表及最新状态、分组和采样数据 |
| `GET /api/targets/:id/history?from=ISO&to=ISO&page=1&pageSize=20` | 指定目标的拨测记录(时间范围 + 分页) |
| `GET /api/targets/:id/trend?from=ISO&to=ISO` | 指定目标的按小时聚合趋势 |
### 响应字段
@@ -204,11 +204,11 @@ API 错误返回 `ApiErrorResponse` 格式:
{ "error": "描述信息", "status": 400 }
```
| 状态码 | 触发场景 |
|--------|---------|
| 400 | 参数格式错误(无效 ID、from/to 缺失或格式错误、page/pageSize 非正整数) |
| 404 | 目标不存在、API 路由未匹配 |
| 405 | 非 GET 方法请求 API 路由 |
| 状态码 | 触发场景 |
| ------ | ----------------------------------------------------------------------- |
| 400 | 参数格式错误(无效 ID、from/to 缺失或格式错误、page/pageSize 非正整数) |
| 404 | 目标不存在、API 路由未匹配 |
| 405 | 非 GET 方法请求 API 路由 |
## 代码质量