border(开发中)

边框组件
image.png

示例:

  1. {
  2. "name": "边框",
  3. "type": "border",
  4. "default": {
  5. "all": {
  6. "style": "solid",
  7. "width": 5,
  8. "color": "red"
  9. }
  10. }
  11. }

padding(开发中)

内边距
image.png

示例:

  1. {
  2. "type": "padding",
  3. "enableHide": true,
  4. "default": {
  5. "top": 5
  6. },
  7. "min": 0,
  8. "max": 1000
  9. }

margin(开发中)

外边距
image.png

示例:

  1. {
  2. "type": "margin",
  3. "enableHide": true,
  4. "default": {
  5. "show": false,
  6. "top": 5,
  7. "bottom": 5,
  8. "left": 5,
  9. "right": 5
  10. },
  11. "min": 0,
  12. "max": 1000
  13. }

_

text

文本输入框,支持定制前后缀。
DataV控件配置 - 图4

配置说明:

Property Description Type remarks
prefix 前缀 string -
suffix 后缀 string -
prefixIcon 前缀图标 string 图标库中名称,如 solid
suffixIcon 后缀图标 string 同上

值说明:

Condition Type example remarks
- string abc -

switch

开关,支持选择是否展示文字状态。
DataV控件配置 - 图5

配置说明:

Property Description Type default remarks
statusText 是否用文字显示状态 boolean false -

值说明:

Condition Type example remarks
- boolean false -

stepper

步进器,支持定制步长,最值以及前后缀。
DataV控件配置 - 图6
配置说明:

Property Description Type default remarks
step 步长 number - -
min 最小值 number - -
max 最大值 number - -
prefix 前缀 string - -
suffix 后缀 string - -
precision 精度(小数位数)) number - 显示精度,仅对小数生效

值说明:

Condition Type example remarks
- number 12 -

slider

滑动条,同时支持单滑块和双滑块,支持定制步长,最值,前后缀,精度,可开启范围显示。
DataV控件配置 - 图7
配置说明:

Property Description Type default remarks
step 步长 number -
min 最小值 number -
max 最大值 number -
prefix 前缀 string -
suffix 后缀 string -
precision 精度 number - 显示精度,仅对小数生效
mode 双滑块 or 单滑块 `’single’ ‘double’` 'single' -
showRange 是否显示范围 boolean false mode == double 生效
showCurrentRange 是否显示当前范围 boolean true

值说明:

Condition Type example remarks
- number 22 -

checkbox

复现框
image.png

配置说明:

Property Description Type default remarks
options 选项列表 array - -
optionCol 选项定宽 number - 用来为选项设定固定宽度,和col用法相同

值说明:

Condition Type example remarks
- array ['a', 'b'] 是 options 中的某些项的 value 组成的数组 [{value: ‘xxx’ ,label: ‘xxx’},…]

radio

单选框。
DataV控件配置 - 图9
配置说明:

Property Description Type default remarks
options 选项列表 array - -
optionCol 选项定宽 number - 用来为选项设定固定宽度,和col用法相同

值说明:

Condition Type example remarks
- stirng abc 是 options 中的某项的 value [{value: ‘xxx’ ,label: ‘xxx’},…]

buttonRadio

按钮单选器。
DataV控件配置 - 图10
配置说明:

Property Description Type default remarks
options 选项列表 array - [{value: ‘xxx’ ,label: ‘xxx’},…]

值说明:

Condition Type example remarks
- stirng abc 是 options 中的某项的 value

iconRadio

图标单选器。
DataV控件配置 - 图11
配置说明:

Property Description Type default remarks
options 选项列表 array - 示例:[{value: ‘xxx’ ,src: ‘xxx’},…] 此处 src 即可以是图片地址,也可以来自图标图图标名称
optionCol 选项定宽 number - 用来为选项设定固定宽度,和col用法相同
evenlySplit 均匀等分 boolean - 使 icon 在一行中均匀分布,当和optionCol 同时出现时, evenlySplit 优先

值说明:

Condition Type example remarks
- stirng abc 是 options 中的某项的 value

image

图片框。
DataV控件配置 - 图12

配置说明:

Property Description Type default remarks
- - - - -

值说明:

Condition Type example remarks
- stirng htttp://123.png - -

select

选择器,支持开启过滤,支持自定义输入,当内容与字体相关时,可开始渲染字体显示字体演示。
DataV控件配置 - 图13
配置说明:

Property Description Type default remarks
options 选项列表 array - [{value:’xxx’, label: ‘xxx’},…]
filterable 是否支持过滤 boolean true -
allowCustom 是否支持输入自定义 boolean true filterable == true 生效
useFont 是否渲染字体 boolean - -

值说明:

Condition Type example remarks
- stirng abc 是 options 中的某项的 value 或者是 自定义输入

imageSelect

图片选择器。
DataV控件配置 - 图14
配置说明:

Property Description Type default remarks
options 选项列表 array - [{value:’xxx’, label: ‘xxx’, src:’xxx’}] 此处 src 为图片地址

值说明:

Condition Type example remarks
- stirng abc 是 options 中的某项的 value

keyBoard

热键定义器。
DataV控件配置 - 图15

值说明:

Condition Type example remarks
- array [16, 38] -

fill

填充框,支持三种填充类型以及他们的组合,’flat’ 代表纯色填充, ‘linearGradient’ 代表渐变填充,’image’ 代表图片填充
DataV控件配置 - 图16
DataV控件配置 - 图17

配置说明:

Property Description Type default remarks
components 可支持填充类型 sub-array of ['flat', 'linearGradient', 'image'] ['flat']

值说明:

Condition Type example remarks
当为纯色填充时 object {type: ‘flat’, value: ‘333’} ‘#333’ 当仅有纯色填充方式时,直接value 值
当为线性渐变填充时 object `{type: ‘linearGradient’, value: { angle: 90, stops: [{color: ‘#333’, offset: 0}, {color: ‘red’, offset: 100}] }} { angle: 90, stops: [{color: ‘#333’, offset: 0}, {color: ‘red’, offset: 100}] }` 当仅有线性渐变填充方式时,直接value 值
当为图片填充时 object {type: ‘ image’, value: {fillType: ‘fit’, url: ‘http://‘, tileSize: 100}} {fillType: ‘fit’, url: ‘http://‘, tileSize: 100} 当仅有图片填充方式时,直接value 值

suite

套件,由一组控件构成。
DataV控件配置 - 图18
配置说明:

Property Description Type default remarks
children 控件模块 object {} -
enableHide 配置项对应元素是否能够在画布隐藏 boolean false true状态时,显示显隐按钮,当前配置项值中增加show字段

值说明:

Condition Type example remarks
- object {show: xx,top: xx, bottom: xx} -

margin

边距高频套件,由四个步进器组件构成,可定制上下左右四个边距值。
DataV控件配置 - 图19
配置说明:

Property Description Type default remarks
components 组件模块 sub-array of ['top', 'bottom', 'left', 'right'] ['top', 'bottom', 'left', 'right'] -
enableHide 配置项对应元素是否能够在画布隐藏 boolean false true状态时,显示显隐按钮,当前配置项值中增加show字段

值说明:

Condition Type example remarks
- object {top: xx, bottom: xx, left: xx, right: xx} -

line

线样式高频组件,由线粗细步进器,平滑方式图标单选器,样式选择器和纯色填充框组成。
DataV控件配置 - 图20
配置说明:

Property Description Type default remarks
components 组件模块 sub-array of ['width', 'curve', 'style', 'color'] ['width', 'curve', 'style', 'color'] -
enableHide 配置项对应元素是否能够在画布隐藏 boolean false true状态时,显示显隐按钮,当前配置项值中增加show字段

值说明:

Condition Type example remarks
- object {width: xx, curve: xx, style: xx, color: xx} -

font

字体高频组件,由字体选择器,字体粗细选择器,字体大小步进器和纯色填充框组成。
DataV控件配置 - 图21
配置说明:

Property Description Type default remarks
components 组件模块 sub-array of ['fontFamily', 'fontWeight', 'fontSize', 'color'] ['fontFamily', 'fontWeight', 'fontSize', 'color'] -
enableHide 配置项对应元素是否能够在画布隐藏 boolean false true状态时,显示显隐按钮,当前配置项值中增加show字段

值说明:

Condition Type example remarks
- object {fontFamily: xx, size: xx, color: xx, fontWeight: xx} -

group

组,可用来组织内容,可以折叠或展开组的内容。
DataV控件配置 - 图22

配置说明:

Property Description Type default remarks
children 组内容 object {} -
enableHide 配置项对应元素是否能够在画布隐藏 boolean false true状态时,显示显隐按钮,当前配置项值中增加show字段
fold 是否默认展开 boolean -

值说明:

Condition Type example remarks
- object {font: xx, margin: xx} -

tabs

**
标签组,切换标签,展示当前标签下的内容,可支持动态增减标签组。
DataV控件配置 - 图23
DataV控件配置 - 图24
配置说明:

Property Description Type default remarks
addable 是否可以动态增减 bool true -
defaultViewMode 默认阅读模式 string row row
maxTabs 最大项数 number Infinity
minTabs 最小项数 number 0
template 动态增减的模板 object {} -
children 各标签组内容 array [] 子控件关键字:_icon / _id / _label
fold 是否默认展开 boolean

值说明:

Condition Type example remarks
- array [{font: xx, margin: xx}, {top: xx, bottom: xx}] 在每个子元素中,可以使用_label更改系列名(如“系列一”改为“模板”),_icon 更改图标

menu

菜单,用于组织配置结构,当前仅支持一级菜单及二级菜单;
一级菜单:
image.png image.png
二级菜单:
image.png image.png

配置说明:

Property Description Type default remarks
children 各菜单内容 object {}

children 配置说明:

Property Description Type default remarks
mode 是否嵌套了二级菜单 string single single:仅一级菜单;
multiple:有二级菜单
name 菜单名 string

示例写法:

  1. "options": {
  2. "name": "菜单",
  3. "type": "menu",
  4. "children": {
  5. "menuA": {
  6. "name": "菜单A",
  7. "mode": "single",
  8. "children": {
  9. "switch": {
  10. "name": "开关",
  11. "type": "switch",
  12. "default": true
  13. }
  14. }
  15. },
  16. "menuB": {
  17. "name": "菜单B",
  18. "mode": "multiple",
  19. "children": {
  20. "menuB1": {
  21. "name": "菜单B1",
  22. "children": {
  23. "text": {
  24. "name": "文本",
  25. "type": "text",
  26. "default": "Hello"
  27. }
  28. }
  29. },
  30. "menuB2": {
  31. "name": "菜单B2",
  32. "children": {
  33. "stepper": {
  34. "name": "步进器",
  35. "type": "stepper",
  36. "default": 1
  37. }
  38. }
  39. }
  40. }
  41. }
  42. }
  43. }

示例截图:
image.png