mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-20 07:14:23 +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
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
getSuitablePlace(node: Node, ref: any): any {
|
getSuitablePlace(node: Node, ref: any): any {
|
||||||
|
// 如果节点是模态框,插入到根节点下
|
||||||
|
if (node?.componentMeta?.isModal) {
|
||||||
|
return { container: this.document.rootNode, ref };
|
||||||
|
}
|
||||||
|
|
||||||
if (this.isRoot() && this.children) {
|
if (this.isRoot() && this.children) {
|
||||||
const dropElement = this.children.filter((c: Node) => {
|
const dropElement = this.children.filter((c: Node) => {
|
||||||
if (!c.isContainer()) {
|
if (!c.isContainer()) {
|
||||||
@ -922,10 +927,6 @@ export class Node<Schema extends NodeSchema = NodeSchema> {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node?.componentMeta?.getMetadata().configure.component?.isModal) {
|
|
||||||
return { container: this.document.rootNode, ref };
|
|
||||||
}
|
|
||||||
|
|
||||||
const canDropIn = this.componentMeta?.prototype?.options?.canDropIn;
|
const canDropIn = this.componentMeta?.prototype?.options?.canDropIn;
|
||||||
if (this.isContainer()) {
|
if (this.isContainer()) {
|
||||||
if (canDropIn === undefined ||
|
if (canDropIn === undefined ||
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user