feat(schema): type可以为undefined,默认表现由使用方自行控制

This commit is contained in:
roymondchen 2022-04-07 14:58:32 +08:00 committed by jia000
parent b8d352a885
commit fe4c0fa2dc

View File

@ -37,7 +37,7 @@ export interface MComponent {
/** 组件ID默认为${type}_${number}}形式, 如page_123 */
id: Id;
/** 组件类型 */
type: string;
type?: string;
/** 组件显示名称 */
name?: string;
/** 组件根Dom上的class */
@ -53,7 +53,7 @@ export interface MComponent {
export interface MContainer extends MComponent {
/** 容器类型,默认为'container' */
type: NodeType.CONTAINER | string;
type?: NodeType.CONTAINER | string;
/** 容器子元素 */
items: (MComponent | MContainer)[];
}