ViewComponent 页面组件
1. 结构声明
- TS Declaration
- JSON Schema
class ViewComponent extends BaseNode {
name: string;
title: string;
description: string;
category: string;
attrs: Array<Attribute>;
events: Array<Event>;
slots: Array<Slot>;
methods: Array<Logic>;
children: Array<ViewComponent>;
blocks: Array<ViewBlock>;
variableMap: Map<string, string> = new Map();
i18nMap: Map<string, Map<string, string>> = new Map();
}
{
"type": "object",
"properties": {
"composedBy": {
"type": "array",
"items": {
"type": "string"
}
},
"changedTime": {
"$ref": "#/definitions/long"
},
"name": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"category": {
"type": "string"
},
"attrs": {
"type": "array",
"items": {
"$ref": "#/definitions/Attribute"
}
},
"events": {
"type": "array",
"items": {
"$ref": "#/definitions/Event"
}
},
"slots": {
"type": "array",
"items": {
"$ref": "#/definitions/Slot"
}
},
"methods": {
"type": "array",
"items": {
"$ref": "#/definitions/Logic"
}
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/ViewComponent"
}
},
"blocks": {
"type": "array",
"items": {
"$ref": "#/definitions/ViewBlock"
}
},
"variableMap": {
"type": "object",
"properties": {
"size": {
"type": "number"
}
},
"required": [
"size"
],
"additionalProperties": false
},
"i18nMap": {
"type": "object",
"properties": {
"size": {
"type": "number"
}
},
"required": [
"size"
],
"additionalProperties": false
}
},
"required": [
"name",
"title",
"description",
"category",
"attrs",
"events",
"slots",
"methods",
"children",
"blocks",
"variableMap",
"i18nMap"
],
"additionalProperties": false
}