From 8a3cc8a6604d9f7e1f9ee6c53578817c7f8834c7 Mon Sep 17 00:00:00 2001 From: JoeAllen <2494136784@qq.com> Date: Tue, 29 Sep 2026 18:02:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B5=84=E6=BA=90=E7=9B=91=E6=8E=A7?= =?UTF-8?q?=E3=80=8C=E5=85=B3=E9=97=AD=E3=80=8D=E6=8C=89=E9=92=AE=E8=A1=A5?= =?UTF-8?q?=E4=B8=8A=20close=5Fdialog=20=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 按钮只声明了样式没绑 on_click,点击无任何效果(右上角 × 为 对话框自带所以能关)。UIA Invoke 端到端验证:点击后对话框关闭。 --- gpui-app/src/ui/resource_dialog.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gpui-app/src/ui/resource_dialog.rs b/gpui-app/src/ui/resource_dialog.rs index 1b6c5af..4ee6243 100644 --- a/gpui-app/src/ui/resource_dialog.rs +++ b/gpui-app/src/ui/resource_dialog.rs @@ -503,7 +503,12 @@ pub fn open(app: Entity, window: &mut Window, cx: &mut App) { h_flex() .justify_end() .w_full() - .child(Button::new("res-close").label("关闭").outline()), + .child( + Button::new("res-close") + .label("关闭") + .outline() + .on_click(|_, window, cx| window.close_dialog(cx)), + ), ) }); }