mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
fix: 修复在没有选中任何画布节点时, 添加模态框异常的 bug
This commit is contained in:
parent
c02f0ec837
commit
34e8105c10
@ -896,6 +896,11 @@ export class Node<Schema extends NodeSchema = NodeSchema> {
|
||||
* @deprecated
|
||||
*/
|
||||
getSuitablePlace(node: Node, ref: any): any {
|
||||
// 如果节点是模态框,插入到根节点下
|
||||
if (node?.componentMeta?.isModal) {
|
||||
return { container: this.document.rootNode, ref };
|
||||
}
|
||||
|
||||
if (this.isRoot() && this.children) {
|
||||
const dropElement = this.children.filter((c: Node) => {
|
||||
if (!c.isContainer()) {
|
||||
@ -922,10 +927,6 @@ export class Node<Schema extends NodeSchema = NodeSchema> {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (node?.componentMeta?.getMetadata().configure.component?.isModal) {
|
||||
return { container: this.document.rootNode, ref };
|
||||
}
|
||||
|
||||
const canDropIn = this.componentMeta?.prototype?.options?.canDropIn;
|
||||
if (this.isContainer()) {
|
||||
if (canDropIn === undefined ||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user