fix(color-picker): 选择色值mode的popup隐藏问题 #1914
Merged
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.
🤔 这个 PR 的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
哈喽,大佬们好。最近给
color-picker
加测试用例时发现个小问题如下:在点开
color-picker
的popup
后,再点开选择色值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
☑️ 请求合并前的自查清单