From cd672e500f8810c87dff5fb90e6544ee9fe2dbe4 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Tue, 16 Jun 2026 22:20:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(client):=20iOS=20=E9=A1=B6=E6=A0=8F?= =?UTF-8?q?=E9=81=BF=E5=BC=80=E7=8A=B6=E6=80=81=E6=A0=8F=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E8=8F=9C=E5=8D=95=E6=8C=89=E9=92=AE=E8=A2=AB=E9=81=AE?= =?UTF-8?q?=E6=8C=A1=E9=80=80=E4=B8=8D=E5=87=BA=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 顶栏 Container 原从 y=0 起绘,iOS 状态栏盖住左上角菜单按钮,窄屏无法 打开抽屉菜单/退出登录。顶栏高度加上 MediaQuery.padding.top,内容下移 一个状态栏高度,蓝色仍铺满到屏幕顶。桌面/Web 状态栏高度为 0 不受影响。 todo #53。 Co-Authored-By: Claude Opus 4.8 --- client/lib/screens/shell/app_shell.dart | 8 +++--- todo/todo.html | 34 ++++++++++++++++++++++--- todo/todo.json | 17 +++++++++++-- 3 files changed, 51 insertions(+), 8 deletions(-) diff --git a/client/lib/screens/shell/app_shell.dart b/client/lib/screens/shell/app_shell.dart index 2c4aaa2..8a87479 100644 --- a/client/lib/screens/shell/app_shell.dart +++ b/client/lib/screens/shell/app_shell.dart @@ -155,6 +155,8 @@ class _AppShellState extends ConsumerState { final isOnline = ref.watch(connectivityProvider); final location = GoRouterState.of(context).matchedLocation; final isMobile = context.isMobile; + // iOS/刘海屏状态栏高度:顶栏需下移此距离,避免菜单按钮被状态栏遮挡 + final topInset = MediaQuery.of(context).padding.top; final sidebarWidth = _sidebarExpanded ? 200.0 : 56.0; final updateNotifier = ref.watch(updateProvider.notifier); final updateInfo = ref.watch(updateProvider).valueOrNull; @@ -169,11 +171,11 @@ class _AppShellState extends ConsumerState { drawerEnableOpenDragGesture: !kIsWeb && isMobile, body: Column( children: [ - // Top Bar + // Top Bar(高度含状态栏内边距,蓝色铺满到屏幕顶,内容下移避开状态栏) Container( - height: 56, + height: 56 + topInset, color: AppTheme.primary, - padding: const EdgeInsets.symmetric(horizontal: 8), + padding: EdgeInsets.only(top: topInset, left: 8, right: 8), child: Row( children: [ IconButton( diff --git a/todo/todo.html b/todo/todo.html index bbff4cc..37c7a69 100644 --- a/todo/todo.html +++ b/todo/todo.html @@ -223,10 +223,10 @@ ul.todo-list { list-style: none; margin: 0; padding: 0; }

酒库管理系统 — 项目 TODO

生成于 2026-06-16 · 真相源 todo/todo.json
-
48全部
+
49全部
1待开始
0开发中
-
33待验收
+
34待验收
14已验收
@@ -318,7 +318,7 @@ ul.todo-list { list-style: none; margin: 0; padding: 0; }
- 🔍 待验收 33 + 🔍 待验收 34 ▴ 收起
@@ -847,6 +847,34 @@ ul.todo-list { list-style: none; margin: 0; padding: 0; } + + + +
  • +
    + iOS 顶栏被状态栏遮挡,菜单按钮点不到(SafeArea) +
    + 待验收 + 重要 + + + +
    +
    + + +