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

Function addComponent

src/components/template/Muse-UI/Breadcrumb.js:33–43  ·  view source on GitHub ↗
(_attr, _slots)

Source from the content-addressed store, hash-verified

31 let oldSlots = component.slots
32 let defaul = [] //default
33 let addComponent = (_attr, _slots) => {
34 let info = {
35 name: 'Breadcrumb Item',
36 ui: 'Muse-UI',
37 id: guid()
38 }
39 let itemTemplate = getTemplate(info, _attr, _slots)
40 itemTemplate.parentId = id
41 components.push(itemTemplate)
42 return itemTemplate
43 }
44 for (let i = 0; i < max; i++) {
45 if (oldSlots.default[i]) {
46 defaul.push(oldSlots.default[i])

Callers 1

handleFunction · 0.70

Calls 2

getTemplateFunction · 0.90
guidFunction · 0.85

Tested by

no test coverage detected