code: function createPopup (element, img) {
    // 获取图片数组
    let imgsSrcArray = getImgsSrc()
    let index = parseInt(element.getAttribute('index'), 10) || 0
  
    let popup = document.createElement('div')
    css(popup, 'display', 'block')
  
    popup.className = 'mip-img-popUp-wrapper'
    popup.setAttribute('data-name', 'mip-img-popUp-name')
  
    // 创建图片预览图层
    let popUpBg = document.createElement('div')
    // 创建多图预览 wrapper
    let carouselWrapper = document.createElement('div')
    // 计算 wrapper 窗口大小，变为视口大小
    css(carouselWrapper, {
      'position': 'absolute',
      'width': viewport.getWidth(),
      'height': viewport.getHeight(),
      'left': 0,
      'top': 0
    })
    // 创建 mip-carousel
    let carousel = document.createElement('mip-carousel')
  
    carousel.setAttribute('layout', 'responsive')
    carousel.setAttribute('index', index + 1)
    carousel.setAttribute('width', viewport.getWidth())
    carousel.setAttribute('height', viewport.getHeight())
  
    for (let i = 0; i < imgsSrcArray.length; i++) {
      let mipImg = document.createElement('div')
      mipImg.className = 'div-mip-img'
      mipImg.setAttribute('data-src', imgsSrcArray[i])
      css(mipImg, {
        'background-image': `url(${imgsSrcArray[i]})`,
        'background-repeat': 'no-repeat',
        'background-size': 'contain',
        'background-position': 'center'
      })
      carousel.appendChild(mipImg)
    }
    popUpBg.className = 'mip-img-popUp-bg'
  
    carouselWrapper.appendChild(carousel)
    popup.appendChild(popUpBg)
    popup.appendChild(carouselWrapper)
    document.body.appendChild(popup)
  
    return popup
  }
docs: 创建图片弹层
  
  @param  {HTMLElement} element mip-img组件元素
  @param  {HTMLElment} img     mip-img元素包裹的img
  @return {HTMLElment}         图片弹层的div