(option, mountE)
| 665 | * 传入配置信息创建元素并返回DOM对象 |
| 666 | */ |
| 667 | const myCreateEle = (option, mountE) => { |
| 668 | let e = document.createElement(option.el || 'div') |
| 669 | option.className && e.classList.add(option.className) |
| 670 | for (let p in (option.props || {})) { |
| 671 | e.setAttribute(p, option.props[p]) |
| 672 | } |
| 673 | e.textContent = option.text || '' |
| 674 | e.style.cssText = option.style || '' |
| 675 | mountE && mountE.appendChild(e) |
| 676 | return e |
| 677 | } |
| 678 | |
| 679 | // 初始生成元素 |
| 680 | const initLoadElement = () => { |
no outgoing calls
no test coverage detected