import MessageBox from 'XXX.vue'
let MessageConstructor = Vue.extend(MessageBox);
const Message = function (options) {
let options = {
data:options
}
let instances = MessageConstructor(options);
instances.vm = instances .$mount();
document.body.appendChild(instances.vm.$el);
return instance.vm;
}
/***
删除组件
***/
destroyElement: function destroyElement() {
//this.$el.addEventListener('transitionend', this.destroyElement);
this.$el.removeEventListener('transitionend', this.destroyElement);
this.$destroy(true);
this.$el.parentNode.removeChild(this.$el);
}
网友评论