Browse Source

docs(cockpit): 补入状态栏为何改绝对定位的说明(票103)

上一提交只把实现(position: absolute + right: var(--topbar-status-inset))入库,
解释「为什么不能留在 grid 里」的注释留在了工作区没带上。这个决定并不直观 ——
留在 grid 居中流程里的话,状态栏一左移只会把中列菜单挤走(票 37 的旧形状),
缺这段说明后人容易误读成随手写的定位。

纯新增 8 行注释,实现与既有契约不动:t103 闸门 55/55、t102 位置闸门 15/15 不变。
ChenJZ 16 hours ago
parent
commit
e5051c7ee4
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/modules/cockpit/CockpitShell.vue

+ 8 - 0
src/modules/cockpit/CockpitShell.vue

@@ -2572,6 +2572,14 @@ const mapDataSourceCredits = computed(() => getDataSourceCredits())
     pointer-events: none;
 }
 
+/* 票 103(维护者 2026-11-02:「归位、返回全球、时间这一栏需要整体向左移动,
+   给页面右侧留出空隙」,留白定稿为整页宽的 15%):状态栏脱离 grid 居中流程,
+   改为**绝对定位**。仍留在 grid 里的话,它左移只会把中列(菜单)挤走 ——
+   那正是票 37 的旧形状;脱流后位移不再参与列宽分配,菜单位置只由
+   --topbar-nav-shift 决定,互不推挤。
+   right 取值 = --topbar-status-inset(15vw,撞到菜单或要出界时收敛),与菜单位移同源。
+   top 50% + translateY(-50%):按钮行仍在原有的 42u 内容区里垂直居中,
+   底边离基线 4u 出血的关系不变(票 17 第八轮 R2)。 */
 .cockpit-shell__top-meta {
     position: absolute;
     top: calc(50% - 5 * var(--u));