/** 通用对象标识 */ export interface IIdentity { /** 对象唯一标识 */ id?: number; /** 对象标识 */ key: string; /** 对象名称 */ name?: string; /** 对象描述 */ description?: string; } //============= schema ============= /** 协议节点,描述一个节点的业务信息 */ export interface ISchemaNode { /** 唯一标识 */ id: string; /** 是否是根节点 */ isSchemaRootNode?: boolean; } /** 协议数据,一组协议节点的描述集合 */ export interface ISchemaData { /** 版本号 */ version: string; /** 协议数据节点 */ schemaNodes: T; } /** 树形结构数据 */ export interface ITreeData { data: T; children: ITreeData[]; } //============= editor ============= /** 编辑项 */ export interface IEditorOptionEntity extends IIdentity { /** 副标题 */ subtitle?: string; /** 配置 */ config?: any; } //============= prop ============= /** 属性编辑项配置 */ export interface IPropEditorOptionEntity extends IEditorOptionEntity { /** 回调钩子,返回 object 对象,里面存放钩子 */ hooks?: string; /** 编辑项 值 转换配置 */ convert?: any; } /** 属性 */ export interface IPropEntity extends IIdentity { /** 分组 */ // 数据支持两种格式,一种是有分组,一种没分组,有分组就要所有数据都有分组,假如没有就归类到其他 group?: string; /** 属性对应的编辑器 */ editorOption?: IPropEditorOptionEntity; /** 属性默认值 */ defaultValue?: any; /** 描述属性的值 的结构 */ combination?: string[]; /** 自定义配置 */ config?: any; } /** 属性分组 */ export interface IPropGroupEntity extends IIdentity { /** 该分类是否锁定 */ lock?: boolean; } //============= component ============= /** 组件属性 */ export interface IComponentPropEntity extends IPropEntity { /** 是否忽略属性 */ ignore?: boolean; /** 是否刷新,用来标示属性改变时是否刷新界面 */ refresh?: boolean; } /** 通用组件 */ export interface IComponentEntity extends IIdentity { /** 组件属性 */ props: IComponentPropEntity[]; /** 组件属性分组 */ propGroups?: IPropGroupEntity[]; /** 自定义配置 */ config?: any; /** 分组 */ group?: string; } /** 组件分组 */ export interface IComponentGroupEntity extends IIdentity { } //============= tree record ============= export interface ITreeRecordEntity extends IIdentity { /** 是否叶子节点,标识树形结构数据的层级 */ isLeaf: boolean; }