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

fix(Dialog&Drawer): Esc key Conflict #5143

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

Wesley-0808
Copy link
Collaborator

@Wesley-0808 Wesley-0808 commented Mar 2, 2025

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

🤔️ 需求背景

看到23年有个PR #3728 @sinbadmaster 做了一半,拉下来之后发现逻辑不太对,不能解决issue中提到的问题。

💡 解决方案

1. 优化弹窗管理,将Drawer添加到弹窗管理的钩子中(#3635)

image

2. DrawerDialog中键盘监听事件中添加阻止事件传播(冒泡)。Issue中esc操作的调用顺序是:Dialog触发Event后Drawer再触发Event,阻止冒泡后Drawer就不再会触发Event了

image

📝 更新日志

  • fix(Drawer): 修复配合Dialog使用场景,esc按键关闭功能与Dialog关闭功能冲突的问题

  • fix(Dialog): 修复配合Drawer使用场景,esc按键关闭功能与Drawer关闭功能冲突的问题

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

Copy link
Contributor

github-actions bot commented Mar 2, 2025

完成

Copy link

pkg-pr-new bot commented Mar 2, 2025

Open in Stackblitz

npm i https://pkg.pr.new/tdesign-vue-next@5143

commit: 01fa1cf

@mustars
Copy link

mustars commented Mar 3, 2025

大佬,终于出手了!!

@Wesley-0808
Copy link
Collaborator Author

@uyarn 看下hooks里的isLastDialogOrDrawer这个方法名是否合理

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants