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
* @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,
};