页面协议
PageSchema
| Key | Value Type | Description | Example |
|---|---|---|---|
| version | string | 协议版本号 | 1.0.0 |
| name | string | 页面名称 | TestPage |
| css | CSSType | 页面 css | — |
| componentsMeta | ComponentMetaType | 页面使用的组件物料 | — |
| thirdLibs | LibMetaType | 页面依赖使用的第三方库描述 | — |
| componentsTree | CRootNodeDataType | 页面结构 | — |
| assets | AssetPackage | 页面使用的所有资源信息,包含 url 信息 | — |
更多描述请参考 【模型定定义】
CRootNodeDataType
| Key | Value Type | Description | Example |
|---|---|---|---|
| id | string | 节点唯一 id | xassas |
| title | string | 节点名称 | root node |
| componentName | string | 组件名称 | Button |
| type | ’lowcode’、 ‘normal’ | 节点类型, lowcode 表示低码组件 | normal |
| props | CPropObjDataType | 组件传入的属性值 | {‘text’: ‘我是一个按钮’} |
| state | Record<string, any> | 组件的 state | - |
| nodeName | string | 组件的 state 别名,便于其他组件索引使用 | - |
| schema | CPageDataType | if type is lowcode, schema is required | - |
| classNames | ClassNameType[] | 存储节点的 className | - |
| css | CSSType[] | 存储节点的 css 样式 | - |
| refId | string | 组件的唯一引用标示 | - |
| children | (string | CNodeDataType)[] | 当前节点的 children 节点 | - |
更多描述请参考 【模型定定义】
ComponentMetaType
更多描述请参考 【模型定定义】
LibMetaType
更多描述请参考 【模型定定义】
CSSType
更多描述请参考 【模型定定义】
AssetPackage
更多描述请参考 【模型定定义】