fix(amis-saas-9408): 细节调整

Change-Id: If20a873df47eb19c3fbe168559d477e8d9d2800c
This commit is contained in:
wibetter 2023-01-31 19:09:19 +08:00
parent 9e7cdb23e5
commit 1708dbd993
2 changed files with 4 additions and 2 deletions

View File

@ -797,7 +797,8 @@ export class EditorManager {
if (
(node.type === 'wrapper' || node.type === 'container') &&
node.schema?.body?.length === 0 &&
(schemaData?.type === 'flex' || subRenderer?.rendererName === 'flex')
(schemaData?.type === 'flex' || subRenderer?.rendererName === 'flex') &&
!node.schema?.isFreeContainer
) {
const newSchemaData = schemaData || subRenderer?.scaffold;
// 布局能力提升: 点击插入新元素当wrapper为空插入布局容器时自动改为置换避免过多层级

View File

@ -1022,7 +1022,8 @@ export function needDefaultWidth(elemType: string) {
'progress',
'diff-editor',
'editor',
'input-range'
'input-range',
'flex'
];
if (needDefaultWidthElemType.indexOf(elemType) > -1) {
return true;