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

Function getStringTypeAttr

src/components/template/index.js:68–84  ·  view source on GitHub ↗
(attributes)

Source from the content-addressed store, hash-verified

66 return inner
67}
68var getStringTypeAttr = function(attributes) {
69
70 // value为空的不添加到模板中
71 let stringAttr = ''
72 Object.keys(attributes).forEach(key => {
73 let attrKey
74 let arr = ['text', 'selection', 'icon','ionicon', 'color'] //这些类型都不用加bind
75 if (arr.includes(attributes[key].type) || attributes[key].notBind) {
76 attrKey = key
77 } else {
78 attrKey = `:${key}`
79 }
80 let attr = attributes[key].value ? `${attrKey}="${attributes[key].value}"\n` : ''
81 stringAttr += attr
82 })
83 return stringAttr
84}
85export { getSlotContent, getTemplate, getStringTypeAttr }

Callers 15

handleFunction · 0.90
handleFunction · 0.90
handleFunction · 0.90
handleFunction · 0.90
handleFunction · 0.90
handleFunction · 0.90
handleFunction · 0.90
handleFunction · 0.90
handleFunction · 0.90
handleFunction · 0.90
handleFunction · 0.90
handleFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected