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)), + ), ) }); }