mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-05-20 04:59:22 +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 组件类型
|
* @param type 组件类型
|
||||||
* @returns Object
|
* @returns Object
|
||||||
*/
|
*/
|
||||||
export const getDefaultPropsValue = (type: string, id: string) => ({
|
export const getDefaultPropsValue = (type: string, id: string) =>
|
||||||
|
['page', 'container'].includes(type)
|
||||||
|
? {
|
||||||
type,
|
type,
|
||||||
id,
|
id,
|
||||||
style: {},
|
style: {},
|
||||||
name: type,
|
name: type,
|
||||||
});
|
items: [],
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
type,
|
||||||
|
id,
|
||||||
|
style: {},
|
||||||
|
name: type,
|
||||||
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user