font表示组件的配置项类型为字体套件,由字体选择器、字体粗细选择器、字体⼤⼩步进器和纯⾊填充框组成。

配置项说明

字段名 含义 类型 是否必选 备注
name 显示名 string
type 类型 string
default 默认值 object {fontFamily:’’,
fontWeight: 0,
color: ‘’,
fontSize: 0
}
components 模块 array 默认值为[‘fontFamily’, ‘fontWeight’, ‘color’, ‘fontSize’]

值说明

条件 数据类型 示例 默认值
object {
fontFamily:’simSun’,
fontWeight: 400,
color: ‘#333’,
fontSize: 12
}
{
“fontFamily”: “Microsoft Yahei”,
“fontWeight”: “normal”,
“color”: “#FFFFFF”,
“fontSize”: 12
}

配置示例

font.png

  1. "font": {
  2. "type": "font",
  3. "name": "字体",
  4. "default": {
  5. "fontFamily": "simSun",
  6. "fontWeight": 400,
  7. "color": "#333",
  8. "fontSize": 12
  9. }
  10. }