fix: 资源监控「关闭」按钮补上 close_dialog 事件

按钮只声明了样式没绑 on_click,点击无任何效果(右上角 × 为
对话框自带所以能关)。UIA Invoke 端到端验证:点击后对话框关闭。
This commit is contained in:
2026-09-29 18:02:27 +08:00
parent 64cc4489e3
commit 8a3cc8a660
+6 -1
View File
@@ -503,7 +503,12 @@ pub fn open(app: Entity<MqttXApp>, window: &mut Window, cx: &mut App) {
h_flex() h_flex()
.justify_end() .justify_end()
.w_full() .w_full()
.child(Button::new("res-close").label("关闭").outline()), .child(
Button::new("res-close")
.label("关闭")
.outline()
.on_click(|_, window, cx| window.close_dialog(cx)),
),
) )
}); });
} }