ColorPicker 颜色选择器

用于颜色选择,支持多种格式。

基础用法

选择透明度

预定义颜色

不同尺寸

属性

属性说明类型可选值默认值
model-value / v-model选中项绑定值string
disabled是否禁用booleanfalse
size尺寸stringlarge / default / small
show-alpha是否支持透明度选择booleanfalse
color-format写入 v-model 的颜色的格式stringhsl / hsv / hex / rgbhex (当 show-alpha 为 false) / rgb (当 show-alpha 为 true)
popper-classColorPicker 下拉菜单自定义图标组件string / Component
predefine预定义颜色array

事件

事件名说明回调参数
change当绑定值变化时触发当前值
active-change面板中当前显示的颜色发生改变时触发当前显示的颜色值