Skip to content

ColorPicker 颜色选择框

规则

js
{
    type: "ColorPicker",
    field: "color",
    title: "颜色",
    value: '#ff7271',
}
{
    type: "ColorPicker",
    field: "color",
    title: "颜色",
    value: '#ff7271',
}

参考:Element_ColorPicker

value :String

Props

参数说明类型可选值默认值
disabled是否禁用booleanfalse
size尺寸stringmedium / small / mini
showAlpha是否支持透明度选择booleanfalse
colorFormat写入 v-model 的颜色的格式stringhsl / hsv / hex / rgbhex(show-alpha 为 false)/ rgb(show-alpha 为 true)
popperClassColorPicker 下拉框的类名string
predefine预定义颜色array

Events

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