Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified db/TDesign.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ enableAlpha | Boolean | false | \- | N
enableMultipleGradient | Boolean | true | \- | N
format | String | RGB | When `enableAlpha` is true, `HEX8/RGBA/HSLA/HSVA` are valid。options: HEX/HEX8/RGB/RGBA/HSL/HSLA/HSV/HSVA/CMYK/CSS | N
inputProps | Object | - | Typescript:`InputProps`,[Input API Documents](./input?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/color-picker/type.ts) | N
isInput | Boolean | true | Whether to display the color value input. When false, only the color swatch is displayed. | N
popupProps | Object | - | Typescript:`PopupProps`,[Popup API Documents](./popup?tab=api)。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/color-picker/type.ts) | N
recentColors | Array | [] | used color recently。Typescript:`Array<string> \| boolean \| null` | N
defaultRecentColors | Array | [] | used color recently。uncontrolled property。Typescript:`Array<string> \| boolean \| null` | N
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ enableAlpha | Boolean | false | 是否开启透明通道 | N
enableMultipleGradient | Boolean | true | 是否允许开启通过点击渐变轴增加渐变梯度,默认开启,关闭时只会存在起始和结束两个颜色 | N
format | String | RGB | 格式化色值。`enableAlpha` 为真时,`HEX8/RGBA/HSLA/HSVA` 有效。可选项:HEX/HEX8/RGB/RGBA/HSL/HSLA/HSV/HSVA/CMYK/CSS | N
inputProps | Object | - | 透传 Input 输入框组件全部属性。TS 类型:`InputProps`,[Input API Documents](./input?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/color-picker/type.ts) | N
isInput | Boolean | true | 是否显示颜色值输入框,值为 false 时仅显示颜色色块 | N
popupProps | Object | - | 透传 Popup 组件全部属性,如 `placement` `overlayStyle` `overlayClassName` `trigger`等。TS 类型:`PopupProps`,[Popup API Documents](./popup?tab=api)。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/color-picker/type.ts) | N
recentColors | Array | [] | 最近使用的颜色。值为 [] 表示以组件内部的“最近使用颜色”为准,值长度大于 0 则以该值为准显示“最近使用颜色”。值为 false 或 null 则完全不显示“最近使用颜色”。TS 类型:`Array<string> \| boolean \| null` | N
defaultRecentColors | Array | [] | 最近使用的颜色。值为 [] 表示以组件内部的“最近使用颜色”为准,值长度大于 0 则以该值为准显示“最近使用颜色”。值为 false 或 null 则完全不显示“最近使用颜色”。非受控属性。TS 类型:`Array<string> \| boolean \| null` | N
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const colorPickerDefaultProps: TdColorPickerProps = {
enableAlpha: false,
enableMultipleGradient: true,
format: 'RGB',
isInput: true,
defaultRecentColors: [],
showPrimaryColorPreview: true,
size: 'medium',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ export interface TdColorPickerProps {
* 透传 Input 输入框组件全部属性
*/
inputProps?: InputProps;
/**
* 是否显示颜色值输入框,值为 false 时仅显示颜色色块
* @default true
*/
isInput?: boolean;
/**
* 透传 Popup 组件全部属性,如 `placement` `overlayStyle` `overlayClassName` `trigger`等
*/
Expand Down
37 changes: 37 additions & 0 deletions packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -37797,6 +37797,43 @@
"Object"
]
},
{
"id": 1782886171,
"platform_framework": [
"2"
],
"component": "ColorPicker",
"field_category": 1,
"field_name": "isInput",
"field_type": [
"4"
],
"field_default_value": "true",
"field_enum": "",
"field_desc_zh": "是否显示颜色值输入框,值为 false 时仅显示颜色色块",
"field_desc_en": "Whether to display the color value input. When false, only the color swatch is displayed.",
"field_required": 0,
"event_input": "",
"create_time": "2026-07-01 06:09:31",
"update_time": "2026-07-01 06:09:31",
"event_output": null,
"custom_field_type": null,
"syntactic_sugar": null,
"readonly": 1,
"html_attribute": 0,
"trigger_elements": "",
"deprecated": 0,
"version": "",
"test_description": null,
"support_default_value": 0,
"field_category_text": "Props",
"platform_framework_text": [
"React(PC)"
],
"field_type_text": [
"Boolean"
]
},
{
"id": 2122,
"platform_framework": [
Expand Down