fix(ui): 浮窗内容区改为列方向 flex 契约,修复插件 tab 内容 0 宽白窗
.floatContent 原为行方向 flex——弹性子项主尺寸(宽)按内容收缩,内在宽度为 0 的插件宿主(如深迹 DeepTrace)塌成 0px 宽:DOM 在、内容画不出(可见白窗 但 DevTools 有内容)。对齐 pane 的内容契约:.floatContent 复制 .paneContent 的列方向 + overflow hidden,浮窗内再包一层 .paneTab(pane 的 per-tab 包装, flex:1),子项宽度由 align-stretch 撑满——浮窗里的 tab 获得与 pane 内完全 一致的尺寸契约。e2e 增加内容绘制断言(浮动后内容子项实际宽度 > 200px), 真实浏览器回归。
This commit is contained in:
@@ -284,8 +284,12 @@ export function FreeWindow(props: {
|
||||
anchor={<span />}
|
||||
/>
|
||||
</div>
|
||||
{/* The tab cell reuses .paneTab (the pane's per-tab wrapper): the
|
||||
column-flex chain (window → .floatContent → .paneTab) is what
|
||||
gives the component a definite width via align-stretch — the exact
|
||||
sizing contract a tab gets inside a pane. */}
|
||||
<div className={css.floatContent}>
|
||||
{renderTab(float.tab, true, float.id)}
|
||||
<div className={css.paneTab}>{renderTab(float.tab, true, float.id)}</div>
|
||||
</div>
|
||||
<div
|
||||
className={css.floatResize}
|
||||
|
||||
Reference in New Issue
Block a user