From 398f9467d035722edbd8750dd539ba27d2345ae5 Mon Sep 17 00:00:00 2001 From: Aisland Date: Wed, 2 Sep 2026 20:33:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(console):=20=E6=92=A4=E9=94=80=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E5=AE=BD=E5=BA=A6600=E4=B8=8A=E9=99=90(=E6=81=A2?= =?UTF-8?q?=E5=A4=8D=E5=8A=A8=E6=80=81=E8=87=AA=E7=94=B1=E6=8B=89=E4=BC=B8?= =?UTF-8?q?)=E4=B8=8E=E5=88=86=E9=9A=94=E7=BA=BF=E5=81=8F=E7=A7=BB(?= =?UTF-8?q?=E8=B4=B4=E5=9B=9E=E5=8E=9F=E8=BE=B9=E7=95=8C)=E2=80=94?= =?UTF-8?q?=E2=80=94=E4=BB=85=E4=BF=9D=E7=95=99=E5=8A=A8=E6=80=81=E5=8F=AF?= =?UTF-8?q?=E7=94=A8=E7=A9=BA=E9=97=B4=E9=92=B3=E5=88=B6=E9=98=B2=E8=B4=9F?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 01_content/lib/client.js | 6 +++--- 01_content/src/client/split.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/01_content/lib/client.js b/01_content/lib/client.js index c92a826..f28d1b2 100644 --- a/01_content/lib/client.js +++ b/01_content/lib/client.js @@ -17347,7 +17347,7 @@ var splitStore = { if (this.geom) { const minContent = main.reduce((a, p) => a + p.min, 0) + Math.max(0, main.length - 1) * GAP; const hi = Math.max(spec.chatWidth.min, this.geom.right - this.geom.left - minContent); - this.chatW = clamp(Math.round(this.chatW), spec.chatWidth.min, Math.min(spec.chatWidth.max, hi)); + this.chatW = clamp(Math.round(this.chatW), spec.chatWidth.min, hi); } const g0 = this.geom; if (g0) { @@ -17487,7 +17487,7 @@ var splitStore = { const main = spec.main ?? []; const minContent = main.reduce((a, p) => a + p.min, 0) + Math.max(0, main.length - 1) * GAP; const hi = Math.max(spec.chatWidth.min, colW - minContent); - this.chatW = clamp(Math.round(w), spec.chatWidth.min, Math.min(spec.chatWidth.max, hi)); + this.chatW = clamp(Math.round(w), spec.chatWidth.min, hi); this.applyMargin(); this.persist(); this.notify(); @@ -19749,7 +19749,7 @@ function WorkspaceLayer(props) { title: hasLeft ? "\u62D6\u52A8\u8C03\u6574\u5DE6\u53F3\u5217\u5BBD" : "\u62D6\u52A8\u8C03\u6574\u804A\u5929\u5BBD\u5EA6", style: { position: "fixed", - left: (hasLeft ? g.left + leftW : chatLeft ? g.left + chatW : g.right - chatW) - DIVIDER / 2 + (hasLeft ? 0 : chatLeft ? 3 : -3), + left: (hasLeft ? g.left + leftW : chatLeft ? g.left + chatW : g.right - chatW) - DIVIDER / 2, top: hasLeft || chatFull ? barTop + BAR_H : bodyTop, width: DIVIDER, height: hasLeft || chatFull ? g.bottom - barTop - BAR_H : mainH, diff --git a/01_content/src/client/split.tsx b/01_content/src/client/split.tsx index 9022bfa..aed6c7d 100644 --- a/01_content/src/client/split.tsx +++ b/01_content/src/client/split.tsx @@ -801,7 +801,7 @@ export const splitStore: SplitState = { if (this.geom) { const minContent = main.reduce((a: number, p: SplitPane) => a + p.min, 0) + Math.max(0, main.length - 1) * GAP const hi = Math.max(spec.chatWidth.min, (this.geom.right - this.geom.left) - minContent) - this.chatW = clamp(Math.round(this.chatW), spec.chatWidth.min, Math.min(spec.chatWidth.max, hi)) + this.chatW = clamp(Math.round(this.chatW), spec.chatWidth.min, hi) } // 均衡默认:无存档尺寸时按当前可用空间比例分配, // 不再出现“其余窗全部贴 min、最后一个吃掉全部余量”的悬殊观感。 @@ -957,7 +957,7 @@ export const splitStore: SplitState = { const main = spec.main ?? [] const minContent = main.reduce((a, p) => a + p.min, 0) + Math.max(0, main.length - 1) * GAP const hi = Math.max(spec.chatWidth.min, colW - minContent) - this.chatW = clamp(Math.round(w), spec.chatWidth.min, Math.min(spec.chatWidth.max, hi)) + this.chatW = clamp(Math.round(w), spec.chatWidth.min, hi) this.applyMargin() this.persist() this.notify() @@ -3059,7 +3059,7 @@ function WorkspaceLayer(props: { spec: LayoutSpec; geom: Geom | null; chatW: num title={hasLeft ? '拖动调整左右列宽' : '拖动调整聊天宽度'} style={{ position: 'fixed', - left: (hasLeft ? g.left + leftW : (chatLeft ? g.left + chatW : g.right - chatW)) - DIVIDER / 2 + (hasLeft ? 0 : (chatLeft ? 3 : -3)), + left: (hasLeft ? g.left + leftW : (chatLeft ? g.left + chatW : g.right - chatW)) - DIVIDER / 2, top: hasLeft || chatFull ? barTop + BAR_H : bodyTop, width: DIVIDER, height: hasLeft || chatFull ? g.bottom - barTop - BAR_H : mainH,