import Vue from 'vue'
export default function create (comp, props) {
  const app = new Vue({
    render (h) {
      return h(comp, { props })
    }
  }).$mount()
  // app.$el为该虚拟DOM的真实DOM
  document.body.appendChild(app.$el)
  // 销毁
  const com = app.$children[0]
  com.remove = function () {
    document.body.removeChild(app.$el)
    app.$destroy()
  }
  return com
}

