From fe4c0fa2dc3642eff7b27057be4593253b470b68 Mon Sep 17 00:00:00 2001 From: roymondchen Date: Thu, 7 Apr 2022 14:58:32 +0800 Subject: [PATCH] =?UTF-8?q?feat(schema):=20type=E5=8F=AF=E4=BB=A5=E4=B8=BA?= =?UTF-8?q?undefined=EF=BC=8C=E9=BB=98=E8=AE=A4=E8=A1=A8=E7=8E=B0=E7=94=B1?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=96=B9=E8=87=AA=E8=A1=8C=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/schema/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schema/src/index.ts b/packages/schema/src/index.ts index f89d69f5..ec43699e 100644 --- a/packages/schema/src/index.ts +++ b/packages/schema/src/index.ts @@ -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)[]; }