code: function getHTMLWH(html) {
    const temp = document.createElement('template');
    const span = document.createElement('span');
    temp.innerHTML = html;
    document.body.appendChild(span);
    if (temp.content) {
      span.appendChild(temp.content, span.lastElementChild);
    } else {
      span.insertAdjacentHTML('beforeend', html);
    }
    span.style.position = 'absolute';
    span.style.zIndex = '-1';
    span.style.display = 'block';
    const whArray = getDomWH(span);
    const result = {
      width: whArray[0],
      height: whArray[1],
    };
    span.parentNode.removeChild(span);
    return result;
  }
docs: 获取字符格式 HTML 的宽高
  
  @param {string} html
  @private
  @return {object}