MCPcopy
hub / github.com/jaweii/Vue-Layout / addComponent

Function addComponent

src/components/template/Muse-UI/Select Field.js:125–135  ·  view source on GitHub ↗
(_attr, _slots)

Source from the content-addressed store, hash-verified

123 let oldSlots = component.slots
124 let defaul = [] //default
125 let addComponent = (_attr, _slots) => {
126 let info = {
127 name: 'Menu Item',
128 ui: 'Muse-UI',
129 id: guid()
130 }
131 let itemTemplate = getTemplate(info, _attr, _slots)
132 itemTemplate.parentId = id
133 components.push(itemTemplate)
134 return itemTemplate
135 }
136 for (let i = 0; i < max; i++) {
137 if (oldSlots.default[i]) {
138 defaul.push(oldSlots.default[i])

Callers 1

handleFunction · 0.70

Calls 2

getTemplateFunction · 0.90
guidFunction · 0.85

Tested by

no test coverage detected