MCPcopy
hub / github.com/baidu/amis / scaffold

Method scaffold

packages/amis-editor-core/src/manager.ts:1944–1957  ·  view source on GitHub ↗
(form: ScaffoldForm, value: any)

Source from the content-addressed store, hash-verified

1942 }
1943
1944 async scaffold(form: ScaffoldForm, value: any): Promise<SchemaObject> {
1945 const scaffoldFormData = form.pipeIn ? await form.pipeIn(value) : value;
1946 if (form.getSchema) {
1947 form = Object.assign({}, form, await form.getSchema(scaffoldFormData));
1948 }
1949
1950 return new Promise(resolve => {
1951 this.store.openScaffoldForm({
1952 ...form,
1953 value: scaffoldFormData,
1954 callback: resolve
1955 });
1956 });
1957 }
1958
1959 async reScaffold(id: string, form: ScaffoldForm, value: any) {
1960 const replaceWith = await this.scaffold(form, value);

Callers 7

addElemMethod · 0.95
insertMethod · 0.95
replaceMethod · 0.95
reScaffoldMethod · 0.95
reScaffoldV2Method · 0.95
openDebugFormMethod · 0.80
dropMethod · 0.80

Calls 2

getSchemaMethod · 0.80
pipeInMethod · 0.45

Tested by

no test coverage detected