颜色 color
说明
颜色允许用户从色板中选取颜色。
示例
{
"id": "barColor",
"name": "进度条颜色",
"type": "color"
}
默认属性
属性 | 说明 | 类型 | 默认值 |
---|---|---|---|
description | 描述 | String | '' |
dist | 输出值 | Object | {value: 'transparent'} |
dynamic | 发布后是否可修改 | Boolean | true |
format | 颜色值格式 | String | 'hex' |
name | 名称 | String | '' |
type | 类型 | String | 'color' |
vip | 是否为付费功能 | Boolean | false |
/**
* 默认配置 - 颜色
*/
module.exports = {
/**
* 描述
* @type {String}
*/
description: '',
/**
* 发布后是否可修改
* @type {Boolean}
*/
dynamic: true,
/**
* 名称
* @type {String}
*/
name: '',
/**
* 格式
* @type {String}
*/
format: 'hex',
/**
* 类型
* @type {String}
* @required
*/
type: 'color',
/**
* 输出
* @type {Object}
*/
dist: {
value: 'transparent'
},
/**
* 付费功能
* @type {Boolean}
*/
vip: false
};
附录
1. 格式
- hex
- hsl
- hsv
- rgb