Attribute 组件属性
1. 结构声明
- TS Declaration
- JSON Schema
class Attribute extends BaseNode {
name: string = '';
group: string;
title: string;
description: string;
typeAnnotation: TypeAnnotation;
required: boolean;
defaultValue: string;
sync: boolean;
advanced: boolean;
options: Array<{
value: string;
title: string;
}>;
}
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"group": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"typeAnnotation": {
"$ref": "#/definitions/TypeAnnotation"
},
"required": {
"type": "boolean"
},
"defaultValue": {
"type": "string"
},
"sync": {
"type": "boolean"
},
"advanced": {
"type": "boolean"
},
"options": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"value",
"title"
],
"additionalProperties": false
}
}
},
"required": [
"name",
"group",
"title",
"description",
"typeAnnotation",
"required",
"defaultValue",
"sync",
"advanced",
"options"
],
"additionalProperties": false
}