fix: 修复统计报表移动端适屏问题

- Shell main 添加 min-w-0 overflow-x-hidden 防止 flex 子元素溢出
- trend API 排除当天数据 (stat_date < CURDATE()),只返回前7天
- StatisticsView 移除移动端 overflow-hidden,改为仅 landscape 模式
- 图表和列表卡片在移动端正确显示全宽内容

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-04-01 21:36:25 +08:00
parent ee3db94c75
commit 2a10c5ae31
3 changed files with 5 additions and 5 deletions

View File

@@ -75,9 +75,9 @@ export default function StatisticsView() {
))}
</div>
<div className="flex flex-col landscape:flex-row gap-4 flex-1 overflow-hidden">
<div className="flex flex-col landscape:flex-row gap-4 flex-1 landscape:overflow-hidden">
{/* Left Side: Trend Chart / Dashboard Sidebar */}
<div className="flex-none landscape:flex-1 landscape:w-2/3 space-y-4 flex flex-col overflow-y-auto no-scrollbar">
<div className="flex-none landscape:flex-1 landscape:w-2/3 space-y-4 flex flex-col overflow-y-auto no-scrollbar min-w-0">
{/* KPI Cards in Landscape */}
<div className="hidden landscape:grid grid-cols-4 gap-4 flex-shrink-0">
<div className="bg-slate-900/50 border border-slate-800 p-4 rounded-2xl">
@@ -180,7 +180,7 @@ export default function StatisticsView() {
</div>
{/* Right Side: Summary Section */}
<div className="w-full landscape:w-1/3 flex-shrink-0 space-y-2 flex flex-col overflow-hidden">
<div className="w-full landscape:w-1/3 flex-shrink-0 space-y-2 flex flex-col landscape:overflow-hidden">
<div className="flex items-center justify-between px-2 flex-shrink-0">
<div className="flex items-center gap-2">
<div className="w-1 h-4 bg-blue-600 rounded-full" />