index.js 364 Bytes
import Vue from 'vue'
import Popup from './index.vue'

const PopupBox = Vue.extend(Popup)
Popup.install = function (title, editItem, data) {
  data.title = title
  data.editItem = editItem
  let instance = new PopupBox({
    data
  }).$mount()
  document.body.appendChild(instance.$el)
  Vue.nextTick(() => {
    instance.isShow = true
  })
}

export default Popup