Skip to content

[犀牛鸟]feat(color-picker): add eyeDropper prop for screen color sampling - #6793

Closed
Lfan-ke wants to merge 4 commits into
Tencent:developfrom
Lfan-ke:feat/color-picker-eyedropper
Closed

[犀牛鸟]feat(color-picker): add eyeDropper prop for screen color sampling#6793
Lfan-ke wants to merge 4 commits into
Tencent:developfrom
Lfan-ke:feat/color-picker-eyedropper

Conversation

@Lfan-ke

@Lfan-ke Lfan-ke commented Jul 10, 2026

Copy link
Copy Markdown

Adds an eyeDropper prop to ColorPicker. When enabled, a button in the panel header invokes the browser's native EyeDropper API to sample any color on screen; the button is disabled automatically when the browser lacks support.

Details:

  • The eyedropper runs through a small self-contained util (color-picker/utils/eyedropper.ts) wrapping window.EyeDropper, so the component does not depend on the common submodule at runtime.
  • The button label is localized through the global config (colorPicker.eyeDropper), consistent with the other color-picker strings, and falls back to 吸色. The i18n key is added across all eight locales in the paired common PR.
  • config-provider/type.ts regenerates with the new eyeDropper field; the panel snapshot is updated for the added conditional node.

Verified locally: tsc --noEmit clean, eslint clean (--max-warnings 0), and the color-picker unit tests pass with the refreshed snapshot.

Depends on Tencent/tdesign-common#2615 (adds the colorPicker.eyeDropper i18n string). The submodule is pinned to that branch; once the common PR merges, the pointer moves to common develop. Please merge the common PR first.

@Wesley-0808 Wesley-0808 changed the title feat(color-picker): add eyeDropper prop for screen color sampling [犀牛鸟]feat(color-picker): add eyeDropper prop for screen color sampling Jul 20, 2026
@uyarn

uyarn commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

/update-common 2615

@uyarn uyarn added the 💭 discussion we are discussing label Jul 29, 2026
@tdesign-bot

tdesign-bot commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

TDesign Component Site Preview Open

Component Preview
tdesign-vue-next 完成
@tdesign-vue-next/chat 完成

Lfan-ke added 3 commits August 5, 2026 02:05
Signed-off-by: 林晨 (Leo Cheng) <leo-cheng@vip.qq.com>
…module

Signed-off-by: 林晨 (Leo Cheng) <leo-cheng@vip.qq.com>
Signed-off-by: 林晨 (Leo Cheng) <leo-cheng@vip.qq.com>
@Lfan-ke
Lfan-ke force-pushed the feat/color-picker-eyedropper branch from a9ef456 to d8b985d Compare August 4, 2026 18:45
…:vue.

Signed-off-by: Leo Cheng <chengkelfan@qq.com>
@uyarn

uyarn commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

谢谢参与犀牛鸟的活动,综合实现的视觉效果,讨论之后决定采纳 #6823 继续推进

@uyarn uyarn closed this Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💭 discussion we are discussing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants