feat(color-picker): add native EyeDropper API support - #2647
Open
yuxi-ovo wants to merge 1 commit into
Open
Conversation
16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
#2568
💡 需求背景和解决方案
需求背景
目前 ColorPicker 的吸色能力仅支持组件内部交互,未支持浏览器提供的原生 EyeDropper API。
Chromium 系浏览器(Chrome、Edge 等)已支持 EyeDropper API,可直接从屏幕中拾取任意颜色,能够提供更符合用户预期的吸色体验。为提升 ColorPicker 的易用性和与浏览器能力的一致性,因此为组件增加浏览器原生吸色器支持,并在不支持该 API 的浏览器中保持原有行为,不影响现有功能。
代码逻辑
功能演示
1f6a5c256fb3a65b70cbf8d7a29c54e3_raw.mp4
📝 更新日志
feat(color-picker): add native EyeDropper API support
☑️ 请求合并前的自查清单