ant-color-picker

前言

ant-design-vue的UI框架中,并没有colorPicker颜色选择器,但是在实际工作中又需要使用到,翻阅了其源码,组件中虽能见到color-picker的身影,但是却是使用不了的,在借鉴element-plus的color-picker的源码下封装了该组件。

效果

源码地址

地址:https://gitee.com/ghkeeping/ant-color-picker

文档

Attributes

参数说明类型可选值默认值
value/v-model绑定值string
size尺寸stringlarge/default/smalldefault
show-alpha是否支持透明度选择booleanfalse
color-format写入v-model的颜色格式stringhsl/hsv/hex/rgbhex(show-alpha 为 false)/ rgb(show-alpha 为 true)
predefine预定义颜色array
placement颜色选择器弹出位置stringtop left right bottom topLeft topRight bottomLeft bottomRight leftTop leftBottom rightTop rightBottomtop

Events

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

前往低代码交流专区

更多推荐