MCPcopy
hub / github.com/alibaba/lowcode-engine / save

Method save

packages/workspace/src/window.ts:108–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106 }
107
108 async save() {
109 const value: any = {};
110 const editorViews = this.resource.editorViews;
111 if (!editorViews) {
112 return;
113 }
114 for (let i = 0; i < editorViews.length; i++) {
115 const name = editorViews[i].viewName;
116 const saveResult = await this.editorViews.get(name)?.save();
117 value[name] = saveResult;
118 }
119 const result = await this.resource.save(value);
120 this.emitter.emit('handle.save');
121
122 return result;
123 }
124
125 onSave(fn: () => void) {
126 this.emitter.on('handle.save', fn);

Callers

nothing calls this directly

Calls 3

saveMethod · 0.65
getMethod · 0.65
emitMethod · 0.65

Tested by

no test coverage detected