fix: 需要将 __designMode 传递到组件

This commit is contained in:
lihao.ylh 2021-09-22 17:14:15 +08:00
parent 76c5acdc38
commit 003318cd13
2 changed files with 2 additions and 2 deletions

View File

@ -189,7 +189,7 @@ class Renderer extends Component<{
documentInstance.mountInstance(schema.id, ref);
}}
customCreateElement={(Component: any, props: any, children: any) => {
const { __id, __desingMode, ...viewProps } = props;
const { __id, ...viewProps } = props;
viewProps.componentId = __id;
const leaf = documentInstance.getNode(__id);
viewProps._leaf = leaf;

View File

@ -151,7 +151,7 @@ class Renderer extends Component<{
suspended={renderer.suspended}
self={renderer.scope}
customCreateElement={(Component: any, props: any, children: any) => {
const { __id, __designMode, ...viewProps } = props;
const { __id, ...viewProps } = props;
viewProps.componentId = __id;
const leaf = documentInstance.getNode(__id) as Node;
if (isFromVC(leaf?.componentMeta)) {