MCPcopy
hub / github.com/xaboy/form-create / defaultRender

Function defaultRender

packages/core/src/render/render.js:366–380  ·  view source on GitHub ↗
(ctx, children)

Source from the content-addressed store, hash-verified

364 return slotBag.getSlots();
365 },
366 defaultRender(ctx, children) {
367 const prop = ctx.prop;
368 if (prop.component) {
369 if (typeof prop.component === 'string') {
370 return this.vNode.make(prop.component, prop, children);
371 } else {
372 return this.vNode.makeComponent(prop.component, prop, children);
373 }
374 }
375 if (this.vNode[ctx.type])
376 return this.vNode[ctx.type](prop, children);
377 if (this.vNode[ctx.originType])
378 return this.vNode[ctx.originType](prop, children);
379 return this.vNode.make(lower(prop.type), prop, children);
380 },
381 createChildrenVnodes(ctx, onInput, force) {
382 this.force = force !== false;
383 this.tmpInput = onInput;

Callers

nothing calls this directly

Calls 1

lowerFunction · 0.90

Tested by

no test coverage detected