Merge branch 'components-panel' of gitlab.alibaba-inc.com:ali-lowcode/ali-lowcode-engine into components-panel

This commit is contained in:
荣彬 2020-07-26 12:43:14 +08:00
commit 14aeb4099b

View File

@ -109,13 +109,18 @@ class Renderer extends Component<{ renderer: SimulatorRenderer }> {
viewProps._leaf = leaf;
viewProps._componentName = leaf?.componentName;
// 如果是容器 && 无children && 高宽为空 增加一个占位容器,方便拖动
if (leaf?.isContainer() && children == null){
if (leaf?.isContainer() && children == null && (!viewProps.style || Object.keys(viewProps.style).length == 0)){
children = <div style={{
height:'100px',
height:'66px',
backgroundColor:'#f0f0f0',
borderColor:'#666666',
border: '1px dotted'
}}></div>
borderColor:'#a7b1bd',
border: '1px dotted',
color:'#a7b1bd',
textAlign:'center',
lineHeight:'66px'
}}>
</div>
}
if (viewProps._componentName === 'Menu') {