优化占位高度及容器默认内边距 (#8204)

* fix: 修复选中组件点击添加新组件方式报错

* chore: 优化容器插件占位高度及默认内边距

* chore: 删掉一个多余的占位颜色
This commit is contained in:
张涛 2023-09-22 13:12:59 +08:00 committed by GitHub
parent 5124b71861
commit a5950228c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 4 deletions

View File

@ -1227,7 +1227,6 @@
&.layout-content {
height: 100%;
min-height: 88px;
background: #f7f7f8;
}
&.fill-placeholder {
@ -1248,7 +1247,7 @@
[data-region] {
position: relative;
min-height: 10px;
min-height: 34px;
&:empty {
min-width: 20px;
@ -1336,6 +1335,10 @@
}
}
[data-renderer='container'] {
min-height: 0;
}
// 移动端有问题先注释了
// 优化画布区页面展示效果

View File

@ -977,7 +977,7 @@ export class EditorManager {
let beforeId = -1;
parent.some((item: any, index: number) => {
let result = false;
if (item.$$id === curActiveId) {
if (item?.$$id === curActiveId) {
beforeId = index;
result = true;
}

View File

@ -1154,7 +1154,7 @@ export const MainStore = types
if (event.context.beforeId) {
const idx = findIndex(
arr,
(item: any) => item.$$id === event.context.beforeId
(item: any) => item?.$$id === event.context.beforeId
);
~idx ? arr.splice(idx, 0, child) : arr.push(child);
} else {

View File

@ -34,6 +34,7 @@ export class ContainerPlugin extends LayoutBasePlugin {
position: 'static',
display: 'block'
},
size: 'none',
wrapperBody: false
};
previewSchema = {