feat:日志修改

This commit is contained in:
dzc committed 2026-07-27 10:51:35 +08:00
1 parent da3eee48c1
commit 5b9ef49564
5 files changed
+147 -49

No files matched your search

+33 -3
View File
@@ -92,6 +92,7 @@ class TerminalHeader extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = FTheme.of(context);
final menuController = Get.find<TerminalMenuControl>();
return Container(
height: 80.h,
padding: EdgeInsets.symmetric(horizontal: 20.w),
@@ -108,7 +109,17 @@ class TerminalHeader extends StatelessWidget {
child: IntrinsicWidth(
child: Row(
children: [
const TerminalBrand(),
Obx(() {
final soleMenu = menuController.soleVisibleBusinessMenu;
return TerminalBrand(
targetMenu: soleMenu,
onTap: soleMenu == null
? null
: () => TerminalNavigationTool.open(
_terminalNavItem(soleMenu).route,
),
);
}),
SizedBox(width: 20.w),
Container(
width: 1,
@@ -192,12 +203,15 @@ class TerminalHeader extends StatelessWidget {
/// 这里使用受约束的 `FittedBox` 保留 React 原型中的斜体、紧字距效果,同时避免
/// 大字号设置把品牌挤出 80 高的终端顶栏。
class TerminalBrand extends StatelessWidget {
const TerminalBrand({super.key});
const TerminalBrand({super.key, this.targetMenu, this.onTap});
final TerminalMenuItemType? targetMenu;
final VoidCallback? onTap;
@override
Widget build(BuildContext context) {
final theme = FTheme.of(context);
return SizedBox(
final brand = SizedBox(
width: 100.w,
height: 55.h,
child: FittedBox(
@@ -214,6 +228,22 @@ class TerminalBrand extends StatelessWidget {
),
),
);
if (onTap == null || targetMenu == null) return brand;
// 侧栏因仅剩一个业务菜单而收起时,品牌作为返回该入口的固定兜底;
// 实际跳转仍交给统一导航守卫处理绑定、联网和设置密码校验。
return Semantics(
button: true,
label: '返回${targetMenu!.title}',
child: Tooltip(
message: '返回${targetMenu!.title}',
child: InkWell(
onTap: onTap,
borderRadius: BorderRadius.circular(XfjDesignTokens.controlRadius),
child: brand,
),
),
);
}
}