|
@@ -17,14 +17,6 @@ let fullscreenLoading;
|
|
|
LoadingConstructor.prototype.originalPosition = '';
|
|
|
LoadingConstructor.prototype.originalOverflow = '';
|
|
|
|
|
|
-const destroyElement = function() {
|
|
|
- this.$el.removeEventListener('transitionend', destroyElement);
|
|
|
- this.$el &&
|
|
|
- this.$el.parentNode &&
|
|
|
- this.$el.parentNode.removeChild(this.$el);
|
|
|
- this.$destroy();
|
|
|
-};
|
|
|
-
|
|
|
LoadingConstructor.prototype.close = function() {
|
|
|
if (this.fullscreen && this.originalOverflow !== 'hidden') {
|
|
|
document.body.style.overflow = this.originalOverflow;
|
|
@@ -37,7 +29,12 @@ LoadingConstructor.prototype.close = function() {
|
|
|
if (this.fullscreen) {
|
|
|
fullscreenLoading = undefined;
|
|
|
}
|
|
|
- this.$el.addEventListener('transitionend', destroyElement.bind(this));
|
|
|
+ this.$on('after-leave', _ => {
|
|
|
+ this.$el &&
|
|
|
+ this.$el.parentNode &&
|
|
|
+ this.$el.parentNode.removeChild(this.$el);
|
|
|
+ this.$destroy();
|
|
|
+ });
|
|
|
this.visible = false;
|
|
|
};
|
|
|
|