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();