VueHead = (Vue, options) => {
    if (installed) return

    installed = true

    if (options) {
      Vue.util.extend(opt, options)
    }

    function init (update) {
      let head = (typeof this.$options.head === 'function') ? this.$options.head.bind(this)() : this.$options.head
      if (!head) return
      Object.keys(head).forEach(key => {
        let prop = head[key]
        if (!prop) return
        let obj = (typeof prop === 'function') ? head[key].bind(this)() : head[key]
        if (key === 'title') {
          util[key](obj)
          return
        }
        util.handle(obj, key, 'head', update)
      })
      this.$emit('okHead')
    }

    function destroy () {
      if (!this.$options.head) return
      util.undoTitle(diffTitle)
      util.undo()
    }

    // v1
    if (Vue.version.match(/[1].(.)+/g)) {
      Vue.mixin({
        ready () {
          init.call(this)
        },
        destroyed () {
          destroy.call(this)
        },
        events: {
          updateHead () {
            init.call(this, true)
            util.update()
          }
        }
      })
    }
    // v2
    if (Vue.version.match(/[2].(.)+/g)) {
      Vue.mixin({
        created () {
          this.$on('updateHead', () => {
            init.call(this, true)
            util.update()
          })
        },
        mounted () {
          init.call(this)
        },
        beforeDestroy () {
          destroy.call(this)
        }
      })
    }
  }
Plugin | vue-head
@param  {Function} Vue
@param  {Object} options