mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-02-28 04:40:32 +00:00
Merge branch 'feat/container-placeholder' into 'release/1.0.0'
feat: 🎸 为容器的占位元素增加一个特定的 class 方便在设计器里定制样式 React 环境下默认对于空容器会增加一个这样的 div 元素方便拖放其内容:  但是注意,其中红线标出的 class 其实之前没有,结果会导致很难定制这个占位元素的样式 -- 比如在卡片组件中,如下图(1)所示标题栏右侧占位的高度就会很高,比较丑;更严重的是如下图(2)所示的,副标题插槽会被换行到看不见的位置:  所以,建议增加这样一个特定 class,这样以后可以在设计器里来调整这个占位元素的样式。 See merge request !955505
This commit is contained in:
commit
ac543a1c3b
@ -117,17 +117,7 @@ class Renderer extends Component<{ renderer: SimulatorRenderer }> {
|
||||
(!viewProps.style || Object.keys(viewProps.style).length === 0)
|
||||
) {
|
||||
children = (
|
||||
<div
|
||||
style={{
|
||||
height:'44px',
|
||||
lineHeight:'44px',
|
||||
backgroundColor: '#f0f0f0',
|
||||
borderColor: '#a7b1bd',
|
||||
border: '1px dotted',
|
||||
color: '#a7b1bd',
|
||||
textAlign: 'center'
|
||||
}}
|
||||
>
|
||||
<div className="lc-container-placeholder">
|
||||
{viewProps.placeholder || '拖拽组件或模板到这里'}
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -53,6 +53,16 @@ html.engine-cursor-ew-resize, html.engine-cursor-ew-resize * {
|
||||
}
|
||||
}
|
||||
|
||||
.lc-container-placeholder {
|
||||
height: 44px;
|
||||
line-height: 44px;
|
||||
background-color: #f0f0f0;
|
||||
border-color: #a7b1bd;
|
||||
border: 1px dotted;
|
||||
color: #a7b1bd;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.engine-empty {
|
||||
background: #f2f3f5;
|
||||
color: #a7b1bd;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user