Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dialog] 增加onBeforeClose回调 #3888

Closed
raohuiyong opened this issue Jan 25, 2024 · 7 comments
Closed

[Dialog] 增加onBeforeClose回调 #3888

raohuiyong opened this issue Jan 25, 2024 · 7 comments
Assignees
Labels
to be published to be published

Comments

@raohuiyong
Copy link

这个功能解决了什么问题

Dialog对话框做表单的时候,点击“确定”提交数据,数据响应可能需要一些时间,这时候用户可以关闭弹窗不是很友好。
我希望在关闭前做一些业务拦截

你建议的方案是什么

新增onBeforeClose函数,类似于Element对话框组件的before-close关闭前的回调,会暂停 Dialog 的关闭. 回调函数内执行 done 参数方法的时候才是真正关闭对话框的时候.

Copy link
Contributor

👋 @raohuiyong,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

Copy link
Contributor

♥️ 有劳 @LeeJim @caoML @vnues @huoyuhao 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @raohuiyong

@Yacj
Copy link

Yacj commented Jan 25, 2024

@raohuiyong
Copy link
Author

@Yacj 根据案例,并未解决我提出的问题。根据案例操作,当我打开弹窗后,再点击【保存】按钮,这个时候在加载中如果点击右上角关闭icon、取消按钮、模态框背景、ESC依然可以关闭弹窗。我的需求是,在加载中,不允许关闭弹框,Element对话框组件是这么实现的

@czq297297
Copy link
Contributor

+1 希望可以增加

@dmyz
Copy link

dmyz commented May 31, 2024

的确需要

@uyarn
Copy link
Collaborator

uyarn commented Nov 20, 2024

supported 1.10.4

@uyarn uyarn closed this as completed Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to be published to be published
Projects
None yet
Development

No branches or pull requests

6 participants