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>;
themes: Array<{
name: string;
type: string;
}>;
}
{
"type": "object",
"properties": {
"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"
}
},
"themes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"name",
"type"
],
"additionalProperties": false
}
}
},
"required": [
"name",
"title",
"description",
"category",
"attrs",
"events",
"slots",
"methods",
"children",
"blocks",
"themes"
],
"additionalProperties": false
}