|
@@ -1,5 +1,5 @@
|
|
|
import PopperJS from 'main/utils/popper';
|
|
|
-import { once } from 'wind-dom/src/event';
|
|
|
+
|
|
|
/**
|
|
|
* @param {HTMLElement} [reference=$refs.reference] - The reference element used to position the popper.
|
|
|
* @param {HTMLElement} [popper=$refs.popper] - The HTML element used as popper, or a configuration used to generate the popper.
|
|
@@ -100,20 +100,13 @@ export default {
|
|
|
|
|
|
doDestroy() {
|
|
|
if (this.showPopper) return;
|
|
|
- this.popperJS && this.popperJS.destroy();
|
|
|
+ this.popperJS.destroy();
|
|
|
this.popperJS = null;
|
|
|
},
|
|
|
|
|
|
destroyPopper() {
|
|
|
if (this.popperJS) {
|
|
|
this.resetTransformOrigin(this.popperJS);
|
|
|
- if (this.transition) {
|
|
|
- once(this.popperJS._popper, 'webkitTransitionEnd', this.doDestroy);
|
|
|
- once(this.popperJS._popper, 'oTransitionend', this.doDestroy);
|
|
|
- once(this.popperJS._popper, 'transitionend', this.doDestroy);
|
|
|
- } else {
|
|
|
- this.doDestroy();
|
|
|
- }
|
|
|
}
|
|
|
},
|
|
|
|