packages/mip/src/util/dom/dom.js
function create (str) {
  createTmpElement.innerHTML = str
  if (!createTmpElement.children.length) {
    return null
  }
  let children = Array.prototype.slice.call(createTmpElement.children)
  createTmpElement.innerHTML = ''
  return children.length > 1 ? children : children[0]
}
function create (str) {
  createTmpElement.innerHTML = str
  if (!createTmpElement.children.length) {
    return null
  }
  let children = Array.prototype.slice.call(createTmpElement.children)
  createTmpElement.innerHTML = ''
  return children.length > 1 ? children : children[0]
}
function create ( str ) { createTmpElement . innerHTML = str if ( ! createTmpElement . children . length ) { return null } let children = Array . prototype . slice . call ( createTmpElement . children ) createTmpElement . innerHTML = '' return children . length > 1 ? children : children [ 0 ] }
Create a element by string

@param {string} str Html string
@return {HTMLElement}
Create a element by string