code: function (vnode, callback) {
      const {
        isArray
      } = utils
      if (isArray(vnode)) {
        if (process.env.NODE_ENV === 'development') {
          console.warn('[vue-render] the ref passed to animation.transitionOnce is a array.')
        }
        vnode = vnode[0]
      }
      const scale = window.weex.config.env.scale
      const info = {
        result: false
      }
      const rectKeys = ['width', 'height', 'top', 'bottom', 'left', 'right']
  
      function recalc (rect) {
        const res = {}
        rectKeys.forEach(key => {
          if (rect[key]) {
            res[key] = rect[key] / scale
          }
        })
        return res
      }
      if (vnode && vnode === 'viewport') {
        info.result = true
        info.size = recalc({
          width: document.documentElement.clientWidth,
          height: document.documentElement.clientHeight,
          top: 0,
          left: 0,
          right: document.documentElement.clientWidth,
          bottom: document.documentElement.clientHeight
        })
      }
      else if (vnode) {
        const el = vnode instanceof HTMLElement
          ? vnode
          : vnode.$el
        if (el.getBoundingClientRect) {
          info.result = true
          info.size = recalc(el.getBoundingClientRect())
        }
        else {
          info.result = false
        }
      }
      const message = info.result ? info : {
        result: false,
        errMsg: 'Illegal parameter'
      }
      callback && callback(message)
      return message
    }
docs: getComponentRect
  @param {String} vnode
  @param {Function} callback