mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-02-28 12:50:38 +00:00
fix: 关闭低代码组件在页面引用时的原地编辑功能
This commit is contained in:
parent
8b0c9189e2
commit
3c07142f71
@ -17,7 +17,7 @@ import {
|
|||||||
} from '../simulator';
|
} from '../simulator';
|
||||||
import Viewport from './viewport';
|
import Viewport from './viewport';
|
||||||
import { createSimulator } from './create-simulator';
|
import { createSimulator } from './create-simulator';
|
||||||
import { Node, ParentalNode, contains, isRootNode } from '../document';
|
import { Node, ParentalNode, contains, isRootNode, isLowCodeComponent } from '../document';
|
||||||
import ResourceConsumer from './resource-consumer';
|
import ResourceConsumer from './resource-consumer';
|
||||||
import {
|
import {
|
||||||
AssetLevel,
|
AssetLevel,
|
||||||
@ -792,7 +792,7 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const node = nodeInst.node || this.project.currentDocument?.rootNode;
|
const node = nodeInst.node || this.project.currentDocument?.rootNode;
|
||||||
if (!node) {
|
if (!node || isLowCodeComponent(node)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1091,6 +1091,10 @@ export function isRootNode(node: Node): node is RootNode {
|
|||||||
return node && node.isRoot();
|
return node && node.isRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function isLowCodeComponent(node: Node): boolean {
|
||||||
|
return node.componentMeta.getMetadata().devMode === 'lowcode';
|
||||||
|
}
|
||||||
|
|
||||||
export function getZLevelTop(child: Node, zLevel: number): Node | null {
|
export function getZLevelTop(child: Node, zLevel: number): Node | null {
|
||||||
let l = child.zLevel;
|
let l = child.zLevel;
|
||||||
if (l < zLevel || zLevel < 0) {
|
if (l < zLevel || zLevel < 0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user