mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
fix: rax 组件无法拖拽的问题
This commit is contained in:
parent
1b966738bc
commit
3a4d47a388
@ -390,15 +390,23 @@ export class SimulatorRendererContainer implements BuiltinSimulatorRenderer {
|
||||
|
||||
getNodeInstance(dom: HTMLElement): NodeInstance<any> | null {
|
||||
const INTERNAL = '_internal';
|
||||
|
||||
let instance = Instance.get(dom);
|
||||
let instance: any = dom;
|
||||
if (!isElement(instance)) {
|
||||
return {
|
||||
docId: instance.props._leaf.document.id,
|
||||
nodeId: instance.props._leaf.getId(),
|
||||
instance,
|
||||
node: instance.props._leaf,
|
||||
};
|
||||
}
|
||||
instance = Instance.get(dom);
|
||||
while (instance && instance[INTERNAL]) {
|
||||
if (isValidDesignModeRaxComponentInstance(instance)) {
|
||||
// const docId = (instance.props as any).schema.docId;
|
||||
return {
|
||||
docId: instance.props._leaf.document.id,
|
||||
nodeId: instance.props._leaf.getId(),
|
||||
instance: instance,
|
||||
instance,
|
||||
node: instance.props._leaf,
|
||||
};
|
||||
}
|
||||
@ -644,4 +652,4 @@ function findComponent(libraryMap: LibraryMap, componentName: string, npm?: NpmI
|
||||
return getSubComponent(library, paths);
|
||||
}
|
||||
|
||||
export default new SimulatorRendererContainer();
|
||||
export default new SimulatorRendererContainer();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user