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();
globalScaleEnabled: boolean = false;
canvasWidth: double = 0;
i18nInfo?: I18nInfo;
}
{
"type": "object",
"properties": {
"composedBy": {
"type": "array",
"items": {
"type": "string"
}
},
"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"
},
"globalScaleEnabled": {
"type": "boolean"
},
"canvasWidth": {
"$ref": "#/definitions/double"
},
"i18nInfo": {
"$ref": "#/definitions/I18nInfo"
}
},
"required": [
"name",
"title",
"type",
"path",
"bindEvents",
"views",
"variables",
"globalScaleEnabled",
"canvasWidth"
],
"additionalProperties": false
}