mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +00:00
feat: 磁贴块的复制按钮点击支持滚动到新节点位置
This commit is contained in:
parent
10dfbe9fc7
commit
3046018a36
@ -178,10 +178,10 @@ export class ComponentMeta {
|
||||
this._title =
|
||||
typeof title === 'string'
|
||||
? {
|
||||
type: 'i18n',
|
||||
'en-US': this.componentName,
|
||||
'zh-CN': title,
|
||||
}
|
||||
type: 'i18n',
|
||||
'en-US': this.componentName,
|
||||
'zh-CN': title,
|
||||
}
|
||||
: title;
|
||||
}
|
||||
|
||||
@ -436,6 +436,10 @@ const builtinComponentActions: ComponentAction[] = [
|
||||
if (parent) {
|
||||
const newNode = doc.insertNode(parent, node, index + 1, true);
|
||||
newNode.select();
|
||||
if (node.getRGL().isRGL) {
|
||||
// 如果是磁贴块复制,则需要滚动到影响位置
|
||||
setTimeout(() => newNode.document.simulator?.scrollToNode(newNode), 10);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user