/*
 * @Author: your name
 * @Date: 2021-07-17 16:35:29
 * @LastEditTime: 2022-01-17 10:32:50
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /gassafety-web/src/utils/createPop.js
 */
import Vue from 'vue'
export default function create (comp, props) {
  console.log("comp",comp)
  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
}

