fix: 资源监控「关闭」按钮补上 close_dialog 事件
按钮只声明了样式没绑 on_click,点击无任何效果(右上角 × 为 对话框自带所以能关)。UIA Invoke 端到端验证:点击后对话框关闭。
This commit is contained in:
@@ -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)),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user