when elementUI uses select, the drop-down position is misplaced and TypeError: PopperJS is not a constructor
[Vue warn]: Error in event handler for "updatePopper": "TypeError: PopperJS is not a constructor"
found in
---> <ElSelectDropdown> at src/lib/ele-components/select/src/select-dropdown.vue
<ElSelect> at src/lib/ele-components/select/src/select.vue
<App> at example/App.vue
<Root>
Source src/utils/vue-popper
updatePopper is the undefined
createPopper where TypeError: PopperJS is not a constructor "
I don"t know what went wrong.
``
createPopper () {
//...
//
this.popperJS = new PopperJS(reference, popper, options);
this.popperJS.onCreate(_ => {
this.$emit("created", this);
this.resetTransformOrigin();
this.$nextTick(this.updatePopper);
});
if (typeof options.onUpdate === "function") {
this.popperJS.onUpdate(options.onUpdate);
}
this.popperJS._popper.style.zIndex = PopupManager.nextZIndex();
this.popperElm.addEventListener("click", stop);
},
updatePopper () {
const popperJS = this.popperJS; // undefined!
if (popperJS) {
popperJS.update();
if (popperJS._popper) {
popperJS._popper.style.zIndex = PopupManager.nextZIndex();
}
} else {
this.createPopper();
}
},