not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

39 lines
667 B

// Popup component based on picoModal
var Popup = {
template: '<div/>',
data: function() {
return {
modal: null,
result: null
}
},
methods: {
show: function(options) {
var vm = this;
requirejs(['picoModal'], function(picoModal) {
vm.modal = modal = picoModal(options)
.afterShow(function(modal) {
vm.$emit("after-show");
})
.afterClose(function(modal) {
vm.$emit("after-close", vm.result);
})
.show();
});
},
close: function(result) {
if (this.modal) {
this.result = result;
this.modal.close();
}
},
destroy: function() {
if (this.modal) {
this.modal.destroy();
}
}
}
}