Skip to content

Commit 5bb8cf5

Browse files
LeoYuanliujuping
authored andcommitted
fix: leaf should be type of ShellNode other than InnerNode
1 parent 2dbd66c commit 5bb8cf5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/editor-skeleton/src/layouts/left-float-pane.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ export default class LeftFloatPane extends Component<{ area: Area<any, Panel> }>
4040
return true;
4141
}
4242
// 点击了 iframe 内容,算失焦
43-
if (document.querySelector('.lc-simulator-content-frame')
44-
.contentWindow.document.documentElement.contains(target)) {
43+
if ((document.querySelector('.lc-simulator-content-frame') as HTMLIFrameElement)?.contentWindow?.document.documentElement.contains(target)) {
4544
return false;
4645
}
4746
// 点击设置区

packages/react-simulator-renderer/src/renderer-view.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class Renderer extends Component<{
195195
viewProps.componentId = __id;
196196
const leaf = documentInstance.getNode(__id) as Node;
197197
if (isFromVC(leaf?.componentMeta)) {
198-
viewProps._leaf = leaf;
198+
viewProps._leaf = leaf.internalToShellNode();
199199
}
200200
viewProps._componentName = leaf?.componentName;
201201
// 如果是容器 && 无children && 高宽为空 增加一个占位容器,方便拖动

0 commit comments

Comments
 (0)