From 1b4227930ac3a483444314bf5cdd9f99dac7cce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=B8=80=E5=AF=B0?= Date: Mon, 16 Mar 2026 00:13:10 +0800 Subject: [PATCH] fix --- ui/src/ui/app-render.ts | 1 + ui/src/ui/components/claw-computer-panel.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/src/ui/app-render.ts b/ui/src/ui/app-render.ts index f5671ec8f6d..bbf717f4134 100644 --- a/ui/src/ui/app-render.ts +++ b/ui/src/ui/app-render.ts @@ -1515,6 +1515,7 @@ export function renderApp(state: AppViewState) { .password=${state.settings.vncPassword} @close=${() => state.toggleClawComputer()} @float=${() => state.setClawComputerWidth(0)} + @dock=${() => state.setClawComputerWidth(600)} style="flex: 1; min-height: 0;" > diff --git a/ui/src/ui/components/claw-computer-panel.ts b/ui/src/ui/components/claw-computer-panel.ts index 9d1cafbb477..521d4b4254b 100644 --- a/ui/src/ui/components/claw-computer-panel.ts +++ b/ui/src/ui/components/claw-computer-panel.ts @@ -582,9 +582,9 @@ export class ClawComputerPanel extends LitElement { } else { // 在右侧松手,保持停靠模式 this.isFloating = false; - // 重置偏移量 - this.dockedOffsetY = this.initialRect.offsetY; this.dockedOffsetX = 0; + // 触发事件告诉父组件展开停靠面板 + this.dispatchEvent(new CustomEvent("dock", { bubbles: true, composed: true })); } this.cleanupDragListeners();