:: BASE_DOC ::
| name | type | default | description | required |
|---|---|---|---|---|
| borderless | Boolean | false | - | N |
| clearable | Boolean | false | - | N |
| closeBtn | String / Boolean / Slot / Function | true | Typescript:string | boolean | TNode。see more ts definition |
N |
| colorModes | Array | ["monochrome", "linear-gradient"] | Typescript:Array<'monochrome' | 'linear-gradient'> |
N |
| disabled | Boolean | undefined | - | N |
| 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。see more ts definition |
N |
| multiple | Boolean | false | - | N |
| popupProps | Object | - | Typescript:PopupProps,Popup API Documents。see more ts definition |
N |
| recentColors | Array | [] | used color recently。.sync is supported。Typescript:boolean | Array<string> | null |
N |
| defaultRecentColors | Array | [] | used color recently。uncontrolled property。Typescript:boolean | Array<string> | null |
N |
| selectInputProps | Object | - | Typescript:SelectInputProps,SelectInput API Documents。see more ts definition |
N |
| showPrimaryColorPreview | Boolean | true | - | N |
| size | String | medium | options: small/medium/large。Typescript:SizeEnum。see more ts definition |
N |
| swatchColors | Array | - | swatch colors。Typescript:Array<string> | null |
N |
| value | String | - | color value。v-model is supported |
N |
| defaultValue | String | - | color value。uncontrolled property | N |
| onChange | Function | Typescript:(value: string, context: { color: ColorObject; trigger: ColorPickerChangeTrigger }) => voidsee more ts definition。 type ColorPickerChangeTrigger = 'palette-saturation-brightness' | 'palette-saturation' | 'palette-brightness' | 'palette-hue-bar' | 'palette-alpha-bar' | 'input' | 'preset' | 'recent' |
N | |
| onPaletteBarChange | Function | Typescript:(context: { color: ColorObject }) => voidsee more ts definition。 interface ColorObject { alpha: number; css: string; hex: string; hex8: string; hsl: string; hsla: string; hsv: string; hsva: string; rgb: string; rgba: string; saturation: number; value: number; isGradient: boolean; linearGradient?: string; } |
N | |
| onRecentColorsChange | Function | Typescript:(value: Array<string>) => void |
N |
| name | params | description |
|---|---|---|
| change | (value: string, context: { color: ColorObject; trigger: ColorPickerChangeTrigger }) |
see more ts definition。type ColorPickerChangeTrigger = 'palette-saturation-brightness' | 'palette-saturation' | 'palette-brightness' | 'palette-hue-bar' | 'palette-alpha-bar' | 'input' | 'preset' | 'recent' |
| clear | (context: { e: MouseEvent }) |
- |
| palette-bar-change | (context: { color: ColorObject }) |
see more ts definition。interface ColorObject { alpha: number; css: string; hex: string; hex8: string; hsl: string; hsla: string; hsv: string; hsva: string; rgb: string; rgba: string; saturation: number; value: number; isGradient: boolean; linearGradient?: string; } |
| recent-colors-change | (value: Array<string>) |
- |