Frontend 前端
前端节点,包含前端的基本信息。
1. 结构声明
- TS Declaration
- JSON Schema
class Frontend extends BaseNode {
name: string = '';
title: string;
type: 'pc' | 'h5';
path: string;
documentTitle: string;
documentIcon: string;
bindEvents: Array<BindEvent>;
views: Array<View>;
variables: Array<FrontendVariable>;
theme: Theme = new Theme();
componentDependencies: Array<Module>;
globalScaleEnabled: boolean = false;
canvasWidth: number = 0;
}
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"title": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"pc",
"h5"
]
},
"path": {
"type": "string"
},
"documentTitle": {
"type": "string"
},
"documentIcon": {
"type": "string"
},
"bindEvents": {
"type": "array",
"items": {
"$ref": "#/definitions/BindEvent"
}
},
"views": {
"type": "array",
"items": {
"$ref": "#/definitions/View"
}
},
"variables": {
"type": "array",
"items": {
"$ref": "#/definitions/FrontendVariable"
}
},
"theme": {
"$ref": "#/definitions/Theme"
},
"componentDependencies": {
"type": "array",
"items": {
"$ref": "#/definitions/Module"
}
},
"globalScaleEnabled": {
"type": "boolean"
},
"canvasWidth": {
"type": "number"
}
},
"required": [
"name",
"title",
"type",
"path",
"documentTitle",
"documentIcon",
"bindEvents",
"views",
"variables",
"theme",
"componentDependencies",
"globalScaleEnabled",
"canvasWidth"
],
"additionalProperties": false
}