mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-15 05:36:39 +00:00
refactor: modify parameter types of onMountNode
This commit is contained in:
parent
dbe0764ff4
commit
391251788a
@ -207,7 +207,7 @@ export default class DocumentModel {
|
|||||||
/**
|
/**
|
||||||
* 当前 document 新增节点事件,此时节点已经挂载到 document 上
|
* 当前 document 新增节点事件,此时节点已经挂载到 document 上
|
||||||
*/
|
*/
|
||||||
onMountNode(fn: (node: Node) => void) {
|
onMountNode(fn: (payload: { node: Node }) => void) {
|
||||||
this[editorSymbol].on('node.add', fn as any);
|
this[editorSymbol].on('node.add', fn as any);
|
||||||
return () => {
|
return () => {
|
||||||
this[editorSymbol].off('node.add', fn as any);
|
this[editorSymbol].off('node.add', fn as any);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user