feat: add closeOnBack
to Popup, CenterPopup and other components built on them
#6438
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #6436
目前有很多用户已经习惯了手势左滑后退来关闭一些 Popup,比如 Android 版微信的这个 Popup,是可以用手势左滑(后退)关闭的。
而 Ant Design Mobile 的 Popup 目前并不支持在检测到后退事件(popstate)时关闭。
建议 Popup 增加此属性,并应用到所有依赖 Popup 的子组件,如 Dialog,Modal,Picker,ActionSheet 等。
用法: