import Dialog from './src/dialog.vue' Dialog.install = function (Vue) { Vue.component(Dialog.name, Dialog) } export default Dialog // export default Icon // let instance: any // let Dialog = { // install(Vue) { // Vue.prototype.$dialog = function (opts = {}) { // let defaultOpts = { // text: '', // duration: 2500, // callback: null as any, // minHeight: '100px', // width: '' // } // let options = Object.assign(defaultOpts, opts) // if (!instance) { // instance = new DialogVue({ // el: document.createElement('div') // }) // } // if (instance.show) return // instance.text = options.text // instance.width = options.width // instance.minHeight = options.minHeight // document.body.appendChild(instance.$el) // instance.show = true // // debugger // // setTimeout(() => { // // instance.show = false // // if (options.callback) { // // options.callback(options) // // } // // }, options.duration) // } // } // } // export default Dialog