mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
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:
@@ -11,7 +11,10 @@ export const colorPickerProps = buildProps({
|
||||
/**
|
||||
* @description binding value
|
||||
*/
|
||||
modelValue: String,
|
||||
modelValue: {
|
||||
type: definePropType<string | null>(String),
|
||||
default: undefined,
|
||||
},
|
||||
/**
|
||||
* @description ColorPicker id
|
||||
*/
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user