mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-20 15:38:32 +00:00
fix: 修复复制组件问题 to #34464969
This commit is contained in:
parent
a2c8bc26f1
commit
6827ac3650
@ -439,8 +439,9 @@ const builtinComponentActions: ComponentAction[] = [
|
|||||||
const { isRGL, rglNode } = node.getRGL();
|
const { isRGL, rglNode } = node.getRGL();
|
||||||
if (isRGL) {
|
if (isRGL) {
|
||||||
// 复制layout信息
|
// 复制layout信息
|
||||||
let layout = rglNode.getPropValue('layout');
|
let layout = rglNode.getPropValue('layout') || [];
|
||||||
let curLayout = layout.filter((item) => item.i === node.getPropValue('fieldId'));
|
let curLayout = layout.filter((item) => item.i === node.getPropValue('fieldId'));
|
||||||
|
if (curLayout && curLayout[0]) {
|
||||||
layout.push({
|
layout.push({
|
||||||
...curLayout[0],
|
...curLayout[0],
|
||||||
i: newNode.getPropValue('fieldId'),
|
i: newNode.getPropValue('fieldId'),
|
||||||
@ -450,6 +451,7 @@ const builtinComponentActions: ComponentAction[] = [
|
|||||||
setTimeout(() => newNode.document.simulator?.scrollToNode(newNode), 10);
|
setTimeout(() => newNode.document.simulator?.scrollToNode(newNode), 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
important: true,
|
important: true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user