分组结构
This commit is contained in:
@@ -9,15 +9,14 @@ interface ScreenDesignTimeConfig {
|
||||
};
|
||||
// 组件配置
|
||||
// 可以支持组件包含子组件
|
||||
// 当type不是group且children非空时表示该组件有子组件
|
||||
components: Array<{
|
||||
id: string; // 组件id(唯一)
|
||||
type: string | "group"; // 组件类型(区别于分组)
|
||||
type: string; // 组件类型
|
||||
name: string; // 组件名称(可由用户定义)
|
||||
parentId?: string; // 组件分组id(如果存在)
|
||||
groupId?: string; // 组件所在分组ID(如果存在)
|
||||
zIndex?: number; // 组件在分组中的层级
|
||||
collapsed?: boolean; // 分组特有属性(当type为"group"时使用)
|
||||
children: ScreenDesignTimeConfig["components"];
|
||||
parentId?: string; // 组件的父组件ID(如果存在)
|
||||
children: ScreenDesignTimeConfig["components"]; // 子组件
|
||||
// 组件在画布上的布局和样式
|
||||
style: {
|
||||
left: number; // 组件在画布上的X轴距离
|
||||
@@ -88,6 +87,11 @@ interface ScreenDesignTimeConfig {
|
||||
}>;
|
||||
};
|
||||
}>;
|
||||
groups: Array<{
|
||||
id: string;
|
||||
name: string;
|
||||
children: Array<string>;
|
||||
}>;
|
||||
// 全局变量
|
||||
// 如果一个全局变量的数据源是静态数据源,则只通过组件的事件去更新变量
|
||||
// 如果一个全局变量的数据源是API,则尽量不要由组件事件去更新这个变量
|
||||
|
||||
Reference in New Issue
Block a user