ant-design-vue 的颜色选择器

因为业务需要用到颜色选择器,但ant-design-vue里没这个组件,所以在网上找到了一个封装好的。这是组件的仓库地址 https://gitee.com/ghkeeping/ant-color-picker?_from=gitee_search

vue3+typeScript基于ant-design-vue2.xx版本封装的颜色选择器

效果

 

参数说明类型可选值默认值
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面板中当前显示的颜色发生改变时触发当前显示的颜色值

引入封装好的组件

import { colorPicker } from '/@/components/ColorPicker';

使用

<colorPicker v-model="configure.FontColor" @change="selectColorPicker" />

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值