(attributes)
| 66 | return inner |
| 67 | } |
| 68 | var 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 | } |
| 85 | export { getSlotContent, getTemplate, getStringTypeAttr } |
no outgoing calls
no test coverage detected