mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-19 14:04:28 +00:00
fix: 使用引擎标准的 lc-container-placeholder,支持 children 属性
This commit is contained in:
parent
05133181ca
commit
b26266547b
@ -151,18 +151,18 @@ class Renderer extends Component<{
|
|||||||
viewProps._leaf = leaf;
|
viewProps._leaf = leaf;
|
||||||
viewProps._componentName = leaf?.componentName;
|
viewProps._componentName = leaf?.componentName;
|
||||||
// 如果是容器 && 无children && 高宽为空 增加一个占位容器,方便拖动
|
// 如果是容器 && 无children && 高宽为空 增加一个占位容器,方便拖动
|
||||||
// if (
|
if (
|
||||||
// !viewProps.dataSource &&
|
!viewProps.dataSource &&
|
||||||
// leaf?.isContainer() &&
|
leaf?.isContainer() &&
|
||||||
// (children == null || (Array.isArray(children) && !children.length)) &&
|
(children == null || (Array.isArray(children) && !children.length)) &&
|
||||||
// (!viewProps.style || Object.keys(viewProps.style).length === 0)
|
(!viewProps.style || Object.keys(viewProps.style).length === 0)
|
||||||
// ) {
|
) {
|
||||||
// children = (
|
children = (
|
||||||
// <div className="lc-container-placeholder" style={viewProps.placeholderStyle}>
|
<div className="lc-container-placeholder" style={viewProps.placeholderStyle}>
|
||||||
// {viewProps.placeholder || '拖拽组件或模板到这里'}
|
{viewProps.placeholder || '拖拽组件或模板到这里'}
|
||||||
// </div>
|
</div>
|
||||||
// );
|
);
|
||||||
// }
|
}
|
||||||
if (viewProps._componentName === 'a') {
|
if (viewProps._componentName === 'a') {
|
||||||
delete viewProps.href;
|
delete viewProps.href;
|
||||||
}
|
}
|
||||||
@ -189,7 +189,7 @@ class Renderer extends Component<{
|
|||||||
return createElement(
|
return createElement(
|
||||||
getDeviceView(Component, device, designMode),
|
getDeviceView(Component, device, designMode),
|
||||||
viewProps,
|
viewProps,
|
||||||
leaf?.isContainer() ? (children == null ? [] : Array.isArray(children) ? children : [children]) : null,
|
leaf?.isContainer() ? (children == null ? [] : Array.isArray(children) ? children : [children]) : children,
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
onCompGetRef={(schema: any, ref: ReactInstance | null) => {
|
onCompGetRef={(schema: any, ref: ReactInstance | null) => {
|
||||||
|
|||||||
@ -63,28 +63,6 @@ html.engine-cursor-ew-resize, html.engine-cursor-ew-resize * {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.engine-empty {
|
|
||||||
background: #f2f3f5;
|
|
||||||
color: #a7b1bd;
|
|
||||||
outline: 1px dashed rgba(31, 56, 88, 0.2);
|
|
||||||
outline-offset: -1px !important;
|
|
||||||
height: 66px;
|
|
||||||
max-height: 100%;
|
|
||||||
min-width: 140px;
|
|
||||||
text-align: center;
|
|
||||||
overflow: hidden;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.engine-empty:before {
|
|
||||||
content: '\62D6\62FD\7EC4\4EF6\6216\6A21\677F\5230\8FD9\91CC';
|
|
||||||
font-size: 14px;
|
|
||||||
z-index: 1;
|
|
||||||
width: 100%;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.engine-document {
|
body.engine-document {
|
||||||
&:after, &:before {
|
&:after, &:before {
|
||||||
content: "";
|
content: "";
|
||||||
@ -93,16 +71,6 @@ body.engine-document {
|
|||||||
&:after {
|
&:after {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
.next-input-group,
|
|
||||||
.next-checkbox-group,.next-date-picker,.next-input,.next-month-picker,
|
|
||||||
.next-number-picker,.next-radio-group,.next-range,.next-range-picker,
|
|
||||||
.next-rating,.next-select,.next-switch,.next-time-picker,.next-upload,
|
|
||||||
.next-year-picker,
|
|
||||||
.next-breadcrumb-item,.next-calendar-header,.next-calendar-table {
|
|
||||||
pointer-events: none !important;
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.engine-live-editing {
|
.engine-live-editing {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user