fix(components): [color-picker] Improve modelValue prop type (#20880)

* fix(components): [color-picker] Improve modelValue prop type

* Revert "fix(components): [color-picker] Improve modelValue prop type"

This reverts commit 450fdfa1da.

* fix(components): [color-picker] Improve modelValue prop type

* Update packages/components/color-picker/src/color-picker.ts

Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com>

* fix: typecheck

---------

Co-authored-by: Noblet Ouways <91417411+Dsaquel@users.noreply.github.com>
Co-authored-by: Dsaquel <291874700n@gmail.com>
This commit is contained in:
JCL206312
2025-06-24 16:35:57 +08:00
committed by GitHub
parent c57b0cab42
commit 1fd8c4b3b2
2 changed files with 5 additions and 2 deletions

View File

@@ -11,7 +11,10 @@ export const colorPickerProps = buildProps({
/**
* @description binding value
*/
modelValue: String,
modelValue: {
type: definePropType<string | null>(String),
default: undefined,
},
/**
* @description ColorPicker id
*/

View File

@@ -6,7 +6,7 @@ import type { ColorFormats } from '@ctrl/tinycolor'
interface ColorOptions {
enableAlpha: boolean
format: string
value?: string
value?: string | null
}
export default class Color {