fix: render children

This commit is contained in:
kangwei 2020-05-29 01:58:10 +08:00
parent dbdd9e485a
commit 487f257bef
3 changed files with 4 additions and 4 deletions

View File

@ -19,7 +19,6 @@
"@ali/lowcode-editor-skeleton": "^0.8.24", "@ali/lowcode-editor-skeleton": "^0.8.24",
"@ali/lowcode-plugin-designer": "^0.9.18", "@ali/lowcode-plugin-designer": "^0.9.18",
"@ali/lowcode-plugin-outline-pane": "^0.8.24", "@ali/lowcode-plugin-outline-pane": "^0.8.24",
"@ali/ve-i18n-util": "^2.0.2",
"@ali/ve-icons": "^4.1.9", "@ali/ve-icons": "^4.1.9",
"@ali/ve-less-variables": "2.0.3", "@ali/ve-less-variables": "2.0.3",
"@ali/ve-popups": "^4.2.5", "@ali/ve-popups": "^4.2.5",

View File

@ -43,7 +43,7 @@ html {
} }
html.engine-blur #engine { html.engine-blur #engine {
-webkit-filter: blur(4px); filter: blur(4px);
} }
.engine-main { .engine-main {

View File

@ -105,12 +105,13 @@ class Renderer extends Component<{ renderer: SimulatorRenderer }> {
customCreateElement={(Component: any, props: any, children: any) => { customCreateElement={(Component: any, props: any, children: any) => {
const { __id, __desingMode, ...viewProps } = props; const { __id, __desingMode, ...viewProps } = props;
viewProps.componentId = __id; viewProps.componentId = __id;
viewProps._leaf = host.document.getNode(__id); const leaf = host.document.getNode(__id);
viewProps._leaf = leaf;
return createElement( return createElement(
getDeviceView(Component, device, designMode), getDeviceView(Component, device, designMode),
viewProps, viewProps,
children == null ? [] : Array.isArray(children) ? children : [children], leaf?.isContainer() ? (children == null ? [] : Array.isArray(children) ? children : [children]) : null,
); );
}} }}
onCompGetRef={(schema: any, ref: ReactInstance | null) => { onCompGetRef={(schema: any, ref: ReactInstance | null) => {