BindAttribute 元素绑定属性
结构声明
- TS Declaration
- Java Class
- JSON Schema
interface BindAttribute {
"concept": "BindAttribute", // 产品概念
"name": string, // 元素绑定属性名称
"type": "string" | "static" | "dynamic", // type
"value": string, // 属性值,type 为 "string" | "static" 的时候生效
"expression": LogicItem, // 属性表达式,type 为 "dynamic" 的时候生效
"destination": Destination, // 跳转页面,name 为 "destination" 时生效
"externalDestination": ExternalDestination, // 跳转页面,name 为 "externalDestination" 时生效
"rules": Array<ValidationRule>, // 验证规则,name 为 "rules" 时生效
"assignee": Assignee, // 经办人,name 为 "assignee" 时生效
"model": boolean, // 是否使用 v-model
"sync": boolean, // 是否开启双向绑定
"playground": Array<LogicItem>, // 草稿态
}
class BindAttributeTreeNode {
ConceptEnum concept; // 产品概念
String name; // 元素绑定属性名称
TypeEnum type; // type
String value; // 属性值,type 为 "string" | "static" 的时候生效
LogicItemTreeNode expression; // 属性表达式,type 为 "dynamic" 的时候生效
DestinationTreeNode destination; // 跳转页面,name 为 "destination" 时生效
ExternalDestinationTreeNode externalDestination; // 跳转页面,name 为 "externalDestination" 时生效
List<ValidationRuleTreeNode> rules; // 验证规则,name 为 "rules" 时生效
AssigneeTreeNode assignee; // 经办人,name 为 "assignee" 时生效
boolean model; // 是否使用 v-model
boolean sync; // 是否开启双向绑定
List<LogicItemTreeNode> playground; // 草稿态
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/BindAttribute",
"definitions": {
"BindAttribute": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "BindAttribute"
},
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"string",
"static",
"dynamic"
]
},
"value": {
"type": "string"
},
"expression": {
"$ref": "#/definitions/LogicItem"
},
"destination": {
"$ref": "#/definitions/Destination"
},
"externalDestination": {
"$ref": "#/definitions/ExternalDestination"
},
"rules": {
"type": "array",
"items": {
"$ref": "#/definitions/ValidationRule"
}
},
"assignee": {
"$ref": "#/definitions/Assignee"
},
"model": {
"type": "boolean"
},
"sync": {
"type": "boolean"
},
"playground": {
"type": "array",
"items": {
"$ref": "#/definitions/LogicItem"
}
}
},
"required": [
"concept",
"name",
"type",
"value",
"expression",
"destination",
"externalDestination",
"rules",
"assignee",
"model",
"sync",
"playground"
],
"additionalProperties": false
}
}
}
示例
简单示例
- JSON
- YAML
{
"concept": "BindAttribute",
"name": "text",
"type": "dynamic",
"value": "text",
"expression": null,
"destination": null,
"externalDestination": null,
"rules": [],
"assignee": null,
"model": false,
"sync": true,
"playground": []
}
concept: BindAttribute
name: text
type: dynamic
value: text
expression: null
destination: null
externalDestination: null
rules: []
assignee: null
model: false
sync: true
playground: []