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

Method addSlot

packages/designer/src/document/node/node.ts:1049–1057  ·  view source on GitHub ↗
(slotNode: INode)

Source from the content-addressed store, hash-verified

1047 }
1048
1049 addSlot(slotNode: INode) {
1050 const slotName = slotNode?.getExtraProp('name')?.getAsString();
1051 // 一个组件下的所有 slot,相同 slotName 的 slot 应该是唯一的
1052 if (includeSlot(this, slotName)) {
1053 removeSlot(this, slotName);
1054 }
1055 slotNode.internalSetParent(this as INode, true);
1056 this._slots.push(slotNode);
1057 }
1058
1059 /**
1060 * 当前node对应组件是否已注册可用

Callers

nothing calls this directly

Calls 6

includeSlotFunction · 0.90
removeSlotFunction · 0.90
pushMethod · 0.80
getAsStringMethod · 0.65
getExtraPropMethod · 0.65
internalSetParentMethod · 0.65

Tested by

no test coverage detected