MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / replaceWith

Method replaceWith

packages/designer/src/document/node/node.ts:762–766  ·  view source on GitHub ↗
(schema: Schema, migrate = false)

Source from the content-addressed store, hash-verified

760 }
761
762 replaceWith(schema: Schema, migrate = false): any {
763 // reuse the same id? or replaceSelection
764 schema = Object.assign({}, migrate ? this.export() : {}, schema);
765 return this.parent?.replaceChild(this, schema);
766 }
767
768 /**
769 * 替换子节点

Callers 1

wrapWithMethod · 0.95

Calls 2

exportMethod · 0.95
replaceChildMethod · 0.65

Tested by

no test coverage detected