Skip to content

ColorPicker 组件

ElementPlus 颜色选择组件

以下是去掉方法说明后面参数类型的中文文档:

方法说明

设置尺寸

php
$this->size('medium');

尺寸,可选值: medium / small / mini。


设置禁用状态

php
$this->disabled(true);

是否禁用,默认值: false。


设置是否支持透明度选择

php
$this->showAlpha(true);

是否支持透明度选择,默认值: false。


设置颜色格式

php
$this->colorFormat('hex');

写入 v-model 的颜色的格式,可选值: hsl / hsv / hex / rgb。


设置下拉框类名

php
$this->popperClass('custom-class');

下拉框的类名。


设置预定义颜色

php
$this->predefine(['#ff0000', '#00ff00']);

预定义颜色。