diff --git a/packages/editor/src/utils/props.ts b/packages/editor/src/utils/props.ts index 8a194602..35b9c132 100644 --- a/packages/editor/src/utils/props.ts +++ b/packages/editor/src/utils/props.ts @@ -243,9 +243,18 @@ export const DEFAULT_CONFIG: FormConfig = fillConfig([]); * @param type 组件类型 * @returns Object */ -export const getDefaultPropsValue = (type: string, id: string) => ({ - type, - id, - style: {}, - name: type, -}); +export const getDefaultPropsValue = (type: string, id: string) => + ['page', 'container'].includes(type) + ? { + type, + id, + style: {}, + name: type, + items: [], + } + : { + type, + id, + style: {}, + name: type, + };