mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(editor): page和container默认value加上items
This commit is contained in:
parent
2856ee3b6c
commit
10577aea68
@ -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,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user