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(color-picker): 选择色值mode的popup隐藏问题 #1914

Merged
merged 1 commit into from
Jan 21, 2023

Conversation

MrWeilian
Copy link
Contributor

@MrWeilian MrWeilian commented Jan 20, 2023

🤔 这个 PR 的性质是?

  • 日常 bug 修复

🔗 相关 Issue

💡 需求背景和解决方案

哈喽,大佬们好。最近给 color-picker 加测试用例时发现个小问题如下:
color-picker
在点开 color-pickerpopup 后,再点开选择色值 mode 下拉框,然后将鼠标移出整个 color-picker-popup,点击一下后色值下拉框没有隐藏。可以在 官方文档中复现

看了下源码,color-picker 组件中对 popup 进行 显隐控制,其中的 useClickOutside 的处理逻辑跟 popup 组件中 useTrigger 的处理类似。并且 picker 组件中传递给 ColorPanel 组件的 togglePopup={setVisible} 也没有用上,所以大佬们看看是不是可以不用在 picker 组件中对 popup 进行显隐控制,将控制交还给 popup 自己。如果可以的话,那上面的问题就能解决了。但是一定要在 picker 中控制 popup 显隐逻辑的话,可能需要将 visible 带进去色值选择的下拉中来正确处理隐藏逻辑了。

📝 更新日志

  • fix(ColorPicker): 修复打开Mode选择器状态下关闭面板没有正确隐藏Mode选择器的问题

  • 本条 PR 不需要纳入 Changelog

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

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

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

@github-actions
Copy link
Contributor

完成

@uyarn
Copy link
Collaborator

uyarn commented Jan 21, 2023

LGTM 确实之前存在缺陷 and happy new year!

@uyarn uyarn merged commit c8ddac1 into Tencent:develop Jan 21, 2023
@uyarn
Copy link
Collaborator

uyarn commented Jan 21, 2023

@MrWeilian PR模板不要随便删减哦 需要靠正确的规范来生成CHANGELOG的 参考下我给你另一个PR修改的#1913 PR性质直接打钩就行 不需要删掉或者用emoji

@MrWeilian
Copy link
Contributor Author

猴的猴的 谢谢。happy new year 兔

@github-actions github-actions bot mentioned this pull request Feb 1, 2023
16 tasks
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