/*
 * @Author: Zh_Strong
 * @Date: 2022-10-15 18:20:18
 * @LastEditTime: 2022-10-18 16:39:58
 * @LastEditors: Zh_Strong
 * @Description: Zh_Strong
 * @FilePath: \layui-encapsulation\layui\lib\colorpicker.js
 */
/**Layui颜色选择器类说明
 * @parameter 传递的参数{}，参数如下：
 ** elem: "", // 绑定元素，(必填项) 指向容器选择器 类型（ string / object）
 */
class lay_colorpicker {
    constructor(parameter = {}) {
        this.parameter = parameter;
        let that = this;
        layui.use(['colorpicker'], function () {
            var colorpicker = layui.colorpicker;
            that.colorpicker = colorpicker.render(that.parameter);
        });
    };
    /**
     * 评分类的参数提示
     */
    static config = {
        elem: "elem",
        color: "color",
        format: "format",
        alpha: "alpha",
        predefine: "predefine",
        colors: "colors",
        size: "size",
        change: "change",
        done: "done"
    };

    static format = {
        rgb: "rgb",
        hex: "hex"
    }

    static size = {
        lg: "lg",
        sm: "sm",
        xs: "xs"
    }
};

export default lay_colorpicker;