mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-20 07:14:23 +00:00
Merge branch 'fix/rax-render-bugs' into 'release/1.0.37'
fix: rax渲染添加容器占位显示 See merge request !1169606
This commit is contained in:
commit
7de210a885
@ -194,6 +194,19 @@ class Renderer extends Component<{
|
|||||||
const leaf = documentInstance.getNode(__id);
|
const leaf = documentInstance.getNode(__id);
|
||||||
viewProps._leaf = leaf;
|
viewProps._leaf = leaf;
|
||||||
viewProps._componentName = leaf?.componentName;
|
viewProps._componentName = leaf?.componentName;
|
||||||
|
// 如果是容器 && 无children && 高宽为空 增加一个占位容器,方便拖动
|
||||||
|
if (
|
||||||
|
!viewProps.dataSource &&
|
||||||
|
leaf?.isContainer() &&
|
||||||
|
(children == null || (Array.isArray(children) && !children.length)) &&
|
||||||
|
(!viewProps.style || Object.keys(viewProps.style).length === 0)
|
||||||
|
) {
|
||||||
|
children = (
|
||||||
|
<div className="lc-container-placeholder" style={viewProps.placeholderStyle}>
|
||||||
|
{viewProps.placeholder || '拖拽组件或模板到这里'}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// if (viewProps._componentName === 'Menu') {
|
// if (viewProps._componentName === 'Menu') {
|
||||||
// Object.assign(viewProps, {
|
// Object.assign(viewProps, {
|
||||||
|
|||||||
@ -83,6 +83,19 @@ html.engine-cursor-ew-resize, html.engine-cursor-ew-resize * {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.lc-container-placeholder {
|
||||||
|
min-height: 60px;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
background-color: rgb(240, 240, 240);
|
||||||
|
border: 1px dotted;
|
||||||
|
color: rgb(167, 177, 189);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
body.engine-document {
|
body.engine-document {
|
||||||
&:after, &:before {
|
&:after, &:before {
|
||||||
content: "";
|
content: "";
|
||||||
@ -110,10 +123,12 @@ body.engine-document {
|
|||||||
user-select: text;
|
user-select: text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* stylelint-disable-next-line selector-max-id */
|
||||||
#app {
|
#app {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.luna-page {
|
.luna-page {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user