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

Fix0817 #2708

Merged
merged 6 commits into from
Aug 31, 2023
Merged

Fix0817 #2708

merged 6 commits into from
Aug 31, 2023

Conversation

Zhanjiachun
Copy link
Contributor

@Zhanjiachun Zhanjiachun commented Aug 17, 2023

弹窗组件如果初始默认显示, 按esc关不掉问题修复

🤔 这个 PR 的性质是?

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

🔗 相关 Issue

#2608

💡 需求背景和解决方案

image
问题:[Dialog] 弹窗组件如果初始默认显示,按esc关不掉 。
解决方案:组件代码里面存在两个问题:1、还没渲染完成就调用this.storeUid(value),导致dialog传入value都为0,需要将该函数等渲染后再调用,才能拿到组件的uid;2、封装的stack函数,老的逻辑是当有dialog默认值为true就一定走push(),当dialog默认值为false就会一定走pop(),这两个都是共用一个data数据,导致data里面的true的dialog都被其他不相干的false的dialog给pop()掉了,这就导致了按ESC没有反应,因为默认true的数据都是空的。所以就要给pop加一个限制,当data不为空时,只有data对应的dialog才有权限去pop();

📝 更新日志

fix(Dialog): 修复弹窗组件如果初始默认显示,按ESC无法关闭的问题

  • 本条 PR 不需要纳入 Changelog

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

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

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

@github-actions
Copy link
Contributor

github-actions bot commented Aug 21, 2023

完成

@uyarn
Copy link
Collaborator

uyarn commented Aug 22, 2023

这个修复不太合适 问题描述应该是组件本身的问题

@Zhanjiachun
Copy link
Contributor Author

已修改重新发起合并请求,请查阅~

@xiaosansiji xiaosansiji merged commit 3d74ef4 into Tencent:develop Aug 31, 2023
5 checks passed
@github-actions github-actions bot mentioned this pull request Sep 5, 2023
uyarn pushed a commit that referenced this pull request Sep 22, 2023
* fix: 弹窗组件如果初始默认显示, 按esc关不掉问题修复 (#2608)

* fix: 弹窗组件如果初始默认显示, 按esc关不掉问题修复 (#2608)

* fix: 弹窗组件如果初始默认显示, 按esc关不掉问题修复 (#2608)

* fix: 弹窗组件如果初始默认显示, 按esc关不掉问题修复 (#2608)

* fix: 弹窗组件如果初始默认显示, 按esc关不掉问题修复 (#2608)
chaishi added a commit that referenced this pull request Sep 22, 2023
* fix(table): tree.defaultExpandAll (#2752)

* Fix0817 (#2708)

* fix: 弹窗组件如果初始默认显示, 按esc关不掉问题修复 (#2608)

* fix: 弹窗组件如果初始默认显示, 按esc关不掉问题修复 (#2608)

* fix: 弹窗组件如果初始默认显示, 按esc关不掉问题修复 (#2608)

* fix: 弹窗组件如果初始默认显示, 按esc关不掉问题修复 (#2608)

* fix: 弹窗组件如果初始默认显示, 按esc关不掉问题修复 (#2608)

* fix(checkbox): multitple checkbox-group exist at the page (#2768)

* fix(checkbox): multitple checkboxgroup

* fix(table): unique key

* feat(table): fix resetValue does not work on clear filter;

* fix(form): fix reset form error (#2760)

Co-authored-by: zhangjiancheng <zhangjiancheng@aibaoxian.com>

* feat(table): fix false value can not highlight filter icon; support filter.label (#2771)

* fix(table): support filter value which is false can highlight filter icon

* feat(table): support filter.label

* docs(table): update demove

* fix(table): title is a function

* fix: lint error

* fix(image): dulplicate preview icon (#2770)

* fix(image): dulplicate preview icon

* fix(image): fix preview url

* fix(table): lint error

* test: update snapshots

* feat(dialog): confirmLoading (#2769)

* feat(dialog): confirmLoading

* test: update snapshots

* fix(popup): clear queued open action caused by accident (#2747)

* Revert "fix(popup): clear queued open action caused by accident (#2747)" (#2775)

This reverts commit e1a1f95.

* fix: fix bundle content (#2776)

* fix: fix remove listener hook (#2777)

* fix(loading): fix loading false create instance again (#2778)

* fix(Select): fix delete exist option when delete input value (#2779)

* feat: release 1.6.5 (#2774)

* feat: release 1.6.5

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix(checkbox): group dynamic (#2793)

* fix(table): multiple editable table (#2787)

* fix(table): multiple editable table

* docs(dialog): demo

* chore: release 1.6.6 (#2795)

* chore: 1.6.6

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat(treeselect): support panel content API (#2797)

* fix: useResizeObserver (#2806)

* chore: update README (#2808)

* feat(table): support group columns (#2810)

* feat(table): column controller

* test(table): update snapshots

* fix(table): props.locale

* fix: lint error

* fix: lint error

* fix(dialog): Dialog component support confirmLoading (#2814)

* fix(dialog): confirmLoading

* docs(dialog): remove docs

* feat(card): replace title span with div (#2812)

* feat(card): replace title span with div

* feat(card): replace title span with div

* chore: release 1.6.7 (#2817)

* chore: release 1.6.7

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore: release 1.6.7-naruto

* chore: release 1.6.7-naruto

---------

Co-authored-by: sheepluo <yaoyanhuoyi@qq.com>
Co-authored-by: Zhanjiachun <49758402+Zhanjiachun@users.noreply.github.com>
Co-authored-by: Zz-ZzzZ <48228016+Zz-ZzzZ@users.noreply.github.com>
Co-authored-by: zhangjiancheng <zhangjiancheng@aibaoxian.com>
Co-authored-by: ikeq <ikeq@foxmail.com>
Co-authored-by: azhe <xiaosansiji@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

None yet

3 participants