@tmagic/editor 1.0.0-rc.7 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -243,9 +243,19 @@ export const DEFAULT_CONFIG: FormConfig = fillConfig([]);
243
243
  * @param type 组件类型
244
244
  * @returns Object
245
245
  */
246
- export const getDefaultPropsValue = (type: string, id: string) => ({
247
- type,
248
- id,
249
- style: {},
250
- name: type,
251
- });
246
+ export const getDefaultPropsValue = (type: string, id: string) =>
247
+ ['page', 'container'].includes(type)
248
+ ? {
249
+ type,
250
+ id,
251
+ layout: 'absolute',
252
+ style: {},
253
+ name: type,
254
+ items: [],
255
+ }
256
+ : {
257
+ type,
258
+ id,
259
+ style: {},
260
+ name: type,
261
+ };