fix(editor): page和container默认value加上items

This commit is contained in:
roymondchen 2022-06-15 12:44:37 +08:00 committed by jia000
parent 2856ee3b6c
commit 10577aea68

View File

@ -243,9 +243,18 @@ export const DEFAULT_CONFIG: FormConfig = fillConfig([]);
* @param type * @param type
* @returns Object * @returns Object
*/ */
export const getDefaultPropsValue = (type: string, id: string) => ({ export const getDefaultPropsValue = (type: string, id: string) =>
type, ['page', 'container'].includes(type)
id, ? {
style: {}, type,
name: type, id,
}); style: {},
name: type,
items: [],
}
: {
type,
id,
style: {},
name: type,
};