mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
新增占位容器
This commit is contained in:
parent
c4f9505b1b
commit
e65a038795
@ -108,6 +108,17 @@ class Renderer extends Component<{ renderer: SimulatorRenderer }> {
|
||||
const leaf = host.document.getNode(__id);
|
||||
viewProps._leaf = leaf;
|
||||
viewProps._componentName = leaf?.componentName;
|
||||
// 如果是容器 && 无children && 高宽为空 增加一个占位容器,方便拖动
|
||||
if (leaf.isContainer() && children == null && !viewProps.style){
|
||||
Object.assign(viewProps, {
|
||||
style:{
|
||||
height:'100px',
|
||||
backgroundColor:'#f0f0f0',
|
||||
borderColor:'#666666',
|
||||
border: '1px dotted'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (viewProps._componentName === 'Menu') {
|
||||
Object.assign(viewProps, {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user