import Vue from 'vue'
import Export from './dk-export.vue'

const messageBox = Vue.extend(Export)

Export.install = function (options, {ok}) {
  // if (typeof options === 'object') {
  //   options = {
  //     location: options
  //   }
  // }
  let instance = new messageBox({
    data: Object.assign(options, {okFunc: ok})
  }).$mount()
  document.body.appendChild(instance.$el)

  Vue.nextTick(() => {
    instance.visible = true
  })
}
export default Export
